linux下自动补全问题: autocomplete sh: ( compgen -d — ” ): No such file or directory
autocomplete sh: <( compgen -d — ” ): No such file or directory
http://www.dansketcher.com/2010/01/15/autocomplete-sh-compgen-d-no-such-file-or-directory/Not much of a title, I know, but something for fellow stumped google-wanderers.. I’ve been playing around with deprec for automatically provisioning new servers for my Rails applications. However, I hit a strange problem where certain command-line auto-completions did not work; I’d get an error message like this: $ lstemp $ cd [hit tab to get autocomplete]-sh: <( compgen -d -- '' ): No such file or directory-sh: <( compgen -f -X -- '' ): No such file or directory The confusing thing was that only the unpriviliged user exhibited this behaviour, not the root user. I tried reinstalling the bash-completion package to no avail (even an aptitude purge then aptitude install did not work). Eventually I came across this rather long post on bugs.debian.org where someone else has the same problem. Essentially it comes down to the unpriviliged user using /bin/sh as the default shell; under these circumstances autocompletion is supposed to not function (although presumably without error). This is despite /bin/sh being a symlink to /bin/bash The fix, then, is actually quite simple. Change the default shell for all your unprivileged users to bash: # usermod -s /bin/bash dansketcher and then when you make new users, make sure you select bash explicitly: # useradd newuser -m -s /bin/bash |
上面已经说了解决方案,简单说就是:
如果用户已经创建的话,执行以下命令:
# usermod -s /bin/bash dansketcher
如果用户未创建,执行以下命令:
# useradd newuser -m -s /bin/bash
注: 转载自 http://hi.baidu.com/oscarbj/blog/item/d6319bef5e72543badafd541.html
linux下自动补全问题: autocomplete sh: ( compgen -d — ” ): No such file or directory相关推荐
- linux 函数自动补全,Shell脚本中实现自动补全功能
对于Linuxer来说,自动补全是再熟悉不过的一个功能了.当你在命令行敲下部分的命令时,肯定会本能地按下Tab键补全完整的命令,当然除了命令补全之外,还有文件名补全. Bash-completion ...
- Linux下命令补全工具bash-completion
Linux下超强的命令补全工具bash-completion 编写 Bash 补全脚本 参考URL: https://kodango.com/bash-competion-programming 在使 ...
- 使用Linux自定义自动补全命令完善自己的shell脚本
对于Linuxer来说,自动补全是再熟悉不过的一个功能了.当你在命令行敲下部分的命令时,肯定会本能地按下Tab键补全完整的命令,当然除了命令补全之外,还有文件名补全. Bash-completion ...
- shell编程-使用complete实现linux命令自动补全
一.背景介绍 我们在linux终端操作的时候经常使用tab按键自动补全命令.那么这个是怎么实现的呢?当自己写脚本的时候如何让用户也能自动补全呢?linux提供了两个重要的命令帮助我们实现: compg ...
- linux 命令自动补全包
linux 其他知识目录 rhel7如果使用最小化安装后,tab键默认是不能自动补全命令的 执行yum install bash-completion之后重启系统正常. 转载于:https://www ...
- linux命令补全包安装,RED HAT LINUX bash 自动补全命令安装
RHEL / CentOS 怎么启用bash命令自动补齐功能呢?请看下面 准备工作:系统镜像,配置好yum源. 1.首先需要安装bash-completion 包:[root@server src]# ...
- Linux 命令自动补全包bash-completion
如果按TAB键不能自动补全诸多命令 如 disable.start等,则需要安装bash-completion包 yum -y install bash-completionbash # 使其生效
- linux python自动补全_Linux下在python命令行中自动补全代码(py2、3,centos、ubuntu)...
每次只在shell中测试少量代码,纯手打也有点麻烦 安装ipython也可以实现这个功能,不过破机子有时候反映会稍微卡顿,比较麻烦 1.不管有没有这个文件,直接打开这个文件 vi ~/.pystart ...
- Linux下VMware虚拟机报Could not open /dev/vmmon: No such file or directory. Please make sure that the kern
sudo vmware-modconfig --console --install-all
最新文章
- 生成对抗网络(GAN)应用于图像分类
- Java设计模式(1)——创建型模式之简单工厂模式(Simple Factory)
- using 指令是不需要的和其他两个C#错误
- pcb成型板aoi检测_缺陷检测 | PCB AOI质量检测之自动定位核选取算法
- java set path_Java Path.setEffect方法代码示例
- mesageflow 集成spider 开发思路 手稿
- Documentation/x86/kernel-stacks
- TensorFlow 实战(五)—— 图像预处理
- SiteMesh JSP布局框架介绍
- ACL2020 | 词向量性别偏见
- boost::algorithm学习
- linux桌面图标主题包,推荐 4 款漂亮的 Linux 图标主题
- 桌面图标有蓝底怎么办
- 2018年年底PC浏览器使用率
- CentOS Stream 9 下如何安装使用花生壳并做内网穿透建站
- Fluent残差图中continuity不收敛如何处理
- 东方通 -- 如何安装、启动、停止、卸载东方通中间件
- Ubuntu开机自启动程序的方法
- 双非长沙理工排名飙升176反超吉大,湖大连续2年超哈工大 | US News 2023
- Python常用库大全及简要说明