bash-completion
Installation
The easiest way to install this software is to use a package; refer to Repology for a comprehensive list of operating system distributions, package names, and available versions.Depending on the package, you may still need to source it from either
/etc/bashrc or ~/.bashrc (or any
other file sourcing those). You can do this by simply using:# Use bash-completion, if available
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
. /usr/share/bash-completion/bash_completion
If you don't have the package readily available for your distribution, or you simply don't want to use one, you can install bash completion using the standard commands for GNU autotools packages:
autoreconf -i # if not installing from prepared release tarball
./configure
make
make check # optional, requires python3 with pytest >= 3.6 and pexpect, dejagnu, and tcllib
make install # as root
profile.d script that loads bash_completion where appropriate.If your system does not use the
profile.d directory (usually below
/etc) mechanism—i.e. does not automatically source shell scripts in
it—you can source the $sysconfdir/profile.d/bash_completion.sh
script in /etc/bashrc or ~/.bashrc.The
profile.d script provides a configuration file hook that can be
used to prevent loading bash_completion on per user basis when it's
installed system wide. To do this:- Turn off programmable completion with
shopt -u progcompin$XDG_CONFIG_HOME/bash_completion(or~/.config/bash_completionif$XDG_CONFIG_HOMEis not set) - Turn it back on (for example in
~/.bashrc) if you want to use programmable completion for other purposes.
Комментарии
Отправить комментарий