解决 debian sudo TAB 键不能自动补全命令的原因
一般情况,命令行输入 sudo apt-get ins 按 tab ,它后面会自动补全为 install 如果右面写了包的名的一部分,按 tab 它也会自动完成或列出候选的,这次parrotOS(基于debian)突然不好使了
首先确认是否安装了 自动补全的插件,输入
apt-get install bash-completion
然后在/etc/bash.bashrc :
即 在 .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 sudo自动补全的更多相关文章

  1. sudo和man的tab自动补全

    要加入sudo和man的tab自动补全功能,只需在~/.bashrc中加入: #Enabling tab-completioncomplete -cf sudocomplete -cf man

  2. mycli---数据库工具(提示、自动补全)

    前言 朋友介绍了一个工具,mycli,支持MySQL查询语句自动补全等,这里给大家介绍一下. 大家也可以直接去官网看一下,安装使用都很简单. 安装 $ pip install -U mycli $ b ...

  3. MyCLI :一个支持自动补全和语法高亮的 MySQL/MariaDB 客户端

    MyCLI 是一个易于使用的命令行客户端,可用于受欢迎的数据库管理系统 MySQL.MariaDB 和 Percona,支持自动补全和语法高亮.它是使用 prompt_toolkit 库写的,需要 P ...

  4. vim自动补全功能

    1.首先下载一个插件:ctags 输入:sudo apt-get install ctags 2.Ctrl+n进行单词的自动补全

  5. Vim自动补全神器–YouCompleteMe

    YouCompleteMe的特别之处 基于语义补全 总所周知,Vim是一款文本编辑器.也就是说,其最基础的工作就是编辑文本,而不管该文本的内容是什么.在Vim被程序员所使用后,其慢慢的被肩负了与IDE ...

  6. vim自动补全插件YouCompleteMe

    前言 Valloric/YouCompleteMe可以说是vim安装最复杂的插件之一,但是一旦装好,却又是非常好用的.YouCompleteMe简称ycm 在安装折腾的过程中,我再一次的体会到,除了官 ...

  7. VIM自动补全插件 - YouCompleteMe--"大神级vim补全插件"

    VIM自动补全插件 - YouCompleteMe 序言 vim 之所以被称为编辑器之神多半归功于其丰富的可DIY的灵活插件功能,( 例如vim下的这款神级般的代码补全插件YouCompleteMe) ...

  8. ipython, 一个 python 的交互式 shell,比默认的python shell 好用得多,支持变量自动补全,自动缩进,支持 bash shell 命令,内置了许多很有用的功能和函数

    一个 python 的交互式 shell,比默认的python shell 好用得多,支持变量自动补全,自动缩进,支持 bash shell 命令,内置了许多很有用的功能和函数. 若用的是fish s ...

  9. Vim自动补全神器:YouCompleteMe

    第一次听说这个插件还是在偶然的情况下看到别人的博客,听说了这个插件的大名.本来打算在实训期间来完成安装的,无奈网实在不给力,也就拖到了回家的时候.在开始准备工作的时候就了解到这个插件不是很容易安装,安 ...

随机推荐

  1. Nginx 配置站点

    1-进入 配置文件夹   cd /etc/nginx/cof.d   2-创建一个一站点名称命名的配置文件   vim kestrel-syslyracom.conf   3-在.conf 文件中输入 ...

  2. DB2 9.5 数据库分区管理及应用实践

    DB2 数据库分区是 DB2 企业版 DPF(Data Partitioning Feature)选件提供的,它主要用来为大规模数据处理.高并发数据访问提供支持.DB2 数据库分区采用 Share-n ...

  3. 使用kdump内核调试工具遇到的问题及解决

    修改linux内核代码或者内核模块的时候,搞不好就会造成linux死机崩溃,crash死机后/var/log/kern.log里面不会有任何异常信息记录.这时候kdump就会派上用场了,网上kdump ...

  4. 微信小程序组件 自定义单选

    <view class='userperson'> <view class='f30 flexca'>请选择您的注册身份</view> <view class ...

  5. HTML5资源站

    前端里:http://www.yyyweb.com/ http://www.cnblogs.com/html5tricks/p/3925844.html

  6. Mysql 学习之 SQL的执行顺序

    mysql的json查询:                                                                       1.一条普通的SQL SELEC ...

  7. dbgrid多选日记

    procedure TForm1.DBGrid1KeyPress(Sender: TObject; var Key: Char); begin then begin DBGrid1.DataSourc ...

  8. mysql(四)log

    慢查询: https://blog.csdn.net/leshami/article/details/39829605 日志组成: https://blog.csdn.net/leshami/arti ...

  9. linux 上传下载

    xshell yum就是傻瓜式的安装软件,你要装什么,yum什么就行了,红帽系统才有yum,乌班图和debian是没有的 输入命令:sudo yum -y install lrzsz rz  上传 从 ...

  10. CSUOJ 1141——第四届河南省程序设计大赛

    题目的意思是给你一个机器人,初始的时候在某一个给定的路灯位置,机器人要把路边所有的路灯关掉,每个路灯都有一个距离和一个功率,求要把所有的路灯关掉最小的最终能耗是多少? 题目是一个很明显的区间DP.可以 ...