<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Package: bash-completion<br>
Version: 1:2.1-4<br>
Severity: minor<br>
Tags: upstream patch<br>
<br>
Figuring out how to customize the pre-installed Debian bash completions<br>
is not easy.<br>
<br>
This is probably what happens to your average CLI user when they get fed<br>
up with some of bash completion's defaults and decide to try to change<br>
them:<br>
<br>
$ make li<TAB><br>
$ # .oO(grr I hate bash completions sometimes)<br>
$ <TAB><TAB><br>
$ man -k completion<br>
dh_bash-completion (1) - install bash completions for package<br>
systemd-notify (1) - Notify service manager about start-up completion and o..<br>
$ # .oO(grumble)<br>
$ less /etc/bash_completion<br>
$ # .oO(I bet that file is really long)<br>
$ less /etc/bash_completions.d/<TAB><TAB><br>
$ .oO(#pick one, I guess)<br>
$ less /etc/bash_completions.d/debconf<br>
$ complete -h<br>
bash: complete: -h: invalid option<br>
complete: usage: complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]<br>
$ # .oO(grumble, google, google)<br>
$ help complete<br>
complete: complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]<br>
Specify how arguments are to be completed by Readline.<br>
<br>
For each NAME, specify how arguments are to be completed. If no options<br>
are supplied, existing completion specifications are printed in a way that<br>
allows them to be reused as input.<br>
<br>
Options:<br>
-p print existing completion specifications in a reusable format<br>
-r remove a completion specification for each NAME, or, if no<br>
NAMEs are supplied, all completion specifications<br>
-D apply the completions and actions as the default for commands<br>
without any specific completion defined<br>
-E apply the completions and actions to "empty" commands --<br>
completion attempted on a blank line<br>
<br>
When completion is attempted, the actions are applied in the order the<br>
uppercase-letter options are listed above. The -D option takes<br>
precedence over -E.<br>
<br>
Exit Status:<br>
Returns success unless an invalid option is supplied or an error occurs.<br>
$ complete -p make<br>
complete -F _make make<br>
$ complete -r make<br>
$ complete -p make<br>
bash: complete: make: no completion specification<br>
$ make li<TAB><br>
$ # .oO(wth?!?)<br>
$ <TAB><TAB><br>
$ complete -p make<br>
complete -F _make make<br>
$ ls /etc/*complet*<br>
/etc/bash_completion<br>
<br>
/etc/bash_completion.d:<br>
debconf initramfs-tools libreoffice.sh unar<br>
desktop-file-validate inkscape pon whiptail<br>
git-prompt insserv pulseaudio-bash-completion.sh<br>
grub jackd pygmentize<br>
$ less /etc/bash_completion<br>
$ less /usr/share/bash-completion/bash_completion<br>
$ # .oO(holy crap I'm not reading all that)<br>
$ zless /usr/share/doc/bash-completion/README.gz<br>
$ # .oO(no screw that I don't want to use M-/ I just want TAB to work here.)<br>
$ less /usr/share/bash-completion/bash_completion<br>
$ # .oO(Oh, it autoloads, THAT's why I can't just remove it.)<br>
$ man builtins<br>
$ # .oO(Ah good the rest of the options were documented there)<br>
$ complete -o default -F _make make<br>
$ make li<TAB>b/fo<TAB>bar.c^Ho<br>
$ # .oO( Finally! )<br>
<br>
Attached is a patch for the README. Some comments in /etc/bash_completion<br>
directing users to the README might also help, or a stub documentation<br>
page for /etc/bash_completion which does so.<br>
<br>
Additionally, the source tree has doc files that do not appear to be<br>
installed, such as doc/bash_completion.txt:<br>
<br>
$ rgrep COMP_FILEDIR_FALLBACK /usr/share<br>
/usr/share/bash-completion/bash_completion: [[ -n ${COMP_FILEDIR_FALLBACK:-} && \<br>
$ zgrep COMP_FILEDIR_FALLBACK /usr/share/*<br>
$ zgrep COMP_FILEDIR_FALLBACK /usr/share/*/*<br>
/usr/share/bash-completion/bash_completion: [[ -n ${COMP_FILEDIR_FALLBACK:-} && \<br>
$ zgrep COMP_FILEDIR_FALLBACK /usr/share/*/*/*<br>
<br>
<br>
<br>
</div>
</body>
</html>