在本文中,我们将向您展示 如何安装 Bash 自动完成功能 在 CentOS/RHEL 或者 Fedora Linux.
您需要使用 YUM 命令来安装 bash-CentOS/RHEL 上的完成包或 Fedora Linux。
输入以下命令进行安装 bash- 完成包:
# yum install bash-completion -y
示例输出:
# yum install bash-completion -y Failed to set locale, defaulting to C Loaded plugins: fastestmirror Setting up Install Process Loading mirror speeds from cached hostfile * base: mirrors.viralvps.com * extras: ftp.nluug.nl * rpmforge: ftp.nluug.nl * updates: mirror.widexs.nl Resolving Dependencies --> Running transaction check ---> Package bash-completion.noarch 0:20060301-1.el6.rf will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================= Package Arch Version Repository Size ======================================================================================= Installing: bash-completion noarch 20060301-1.el6.rf rpmforge 125 k Transaction Summary ======================================================================================= Install 1 Package(s) Total download size: 125 k Installed size: 470 k Downloading Packages: bash-completion-20060301-1.el6.rf.noarch.rpm | 125 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : bash-completion-20060301-1.el6.rf.noarch 1/1 Verifying : bash-completion-20060301-1.el6.rf.noarch 1/1 Installed: bash-completion.noarch 0:20060301-1.el6.rf Complete!
要使用自动竞赛功能,您需要按 TAB 键(例如: yum install ht ):
就这些!