配置slackware的Bash命令补全——bash_completion

linux下的shell一般都有命令补全的功能,不过用了bash_completion之后你才会知道什么叫强大,什么叫智能!使用起来很简单:

  1. 下载bash_completion的最新版本,目前为bash-completion-20060301.tar.gz
  2. tar zxvf … 解压缩,得到一堆文件,其中文件README很清楚明了的说明了用法。
  3. cp bash_completion /etc/; cp bash_completion.sh /etc/profile.d。
  4. 搞定了!重新登录即可生效。

有了这个插件,不光sudo也可以补全了,而且连部分命令的参数也能自动补全,还会自动识别对应的后缀,比如tar zxvf 就会只补全tar.gz后缀的文件。很好,很强大吧?

About 王永杰

路漫漫其修远兮,吾将上下而求索
This entry was posted in linux应用, 技术为本. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>