解决 debian TAB 键不能自动补全命令的原因
来源:互联网 发布:淘宝严重违规不扣分 编辑:程序博客网 时间:2024/05/21 10:31
http://hi.baidu.com/liheng_2009/blog/item/607b09614ba93f6c0d33fa6b.html
般情况,命令行输入 sudo apt-get ins 按 tab ,它后面会自动补全为 install 如果右面写了包的名的一部分,按 tab 它也会自动完成或列出候选的,这次装了个 debian 5 突然不好使了
问了一圈都不知道,后来还是在老外的 blog 上找到答案:
即 在 .bash_profile 里加
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
就 ok 了
链接:http://gumelta.com/add-bash-completion-in-debian.php
完整 copy 下来吧:
Add Bash Completion In Debian
ash completion is a useful tool for completion of file paths, commands etc. By default it is enabled on Ubuntu but not on Debian. With two simple steps it can also be enabled on Debian.
1. Install bash-completion
First of all we need the install the according package:
apt-get install bash-completion
2. Add it to the bash profile
Either edit the ~/.bash_profile file to enable it only for a given user or edit /etc/profile to add it system-wide. Add the following code:
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
3. Try it
In order for it to work you have to log out and relogin and then you can make use of bash completion the usual way. E.g. issue:
apt-g
and then press the TAB key once and the command will be completed to apt-get. Or issue this:
apt
and then press TAB key twice. You can also try with
apt-get install apa
and then press TAB key once to complete as far as possible and a second time to list all options.
- 解决 debian TAB 键不能自动补全命令的原因
- ubuntu tab键不能自动补全命令的参数
- Shell下不能使用Tab补全命令的原因
- 解决 ubuntu apt-get TAB 键不能自动补全
- ubantu 16.4 终端tab键命令不能补全的原因
- Debian 8 Tab命令无法自动补全
- ubuntu tab键命令不能补全的问题
- 解决linux终端按tab不能自动补全的问题
- Python命令还使用tab键自动补全和xshell不能使用删除键
- VNC中Tab键不能实现命令自动补全解决方法
- Ubuntu14.04系统Tab键不能自动补全问题解决
- linux tab 不能自动补全 上下键乱码
- Ubuntu系统Tab键不能自动补全问题解决
- ubuntu终端Tab键不能自动补全
- Linux下解决sudo输入命令不能自动补全
- 配置python命令tab键自动补全
- 配置python命令tab键自动补全
- Python命令添加Tab键自动补全
- AE开发中、放大、缩小、漫游、全图的实现
- MongoDB入门1——简介、安装及基本使用
- 文字打散不变形(只在flashCS5.5中有效)
- 环境变量path的妙用-_-!...
- 如何修改应用程序的图标以及exe文件的图标
- 解决 debian TAB 键不能自动补全命令的原因
- 笔记总结--学习JFreeChart
- 中国再次接力奥林匹克美术大会,世界各国艺术家积极参与
- AE开发---绘制图形
- MongoDB入门2——MongoDB数据类型
- 月薪过了6000的应届生,都知道这些网站
- Keil IAR - Cortex M3 调试问题及解决方法(1)
- MongoDB入门3——更新文档和修改器1
- 【美术大展】2012奥林匹克美术大会介绍