[Bash-completion-devel] Bug#648319: bash-completion: /etc/bash_completion script doesn't do the job
Jonathan Nieder
jrnieder at gmail.com
Wed Jan 11 08:39:43 UTC 2012
rush wrote:
> 2012/1/11, Jonathan Nieder <jrnieder at gmail.com>:
>> I don't follow. Isn't COMPAT_DIR _supposed_ to point to
>> /etc/bash_completion.d? Which completion is not working?
>
> If I specify /etc/bash_completion.d in this variable noone from
> /usr/share/bash-completion/completions/ will work. I tested on ssh,
> ip, apt-get, aptitude and others (nothing happens on TAB [[only dirs
> suggested for completion]]).
Ah, I see. Good catch --- it's due to this line:
[[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
Probably something like
local compscript=$(readlink -f "$BASH_SOURCE")
[[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
in its place would do the trick.
Thanks for finding it.
Sincerely,
Jonathan
More information about the Bash-completion-devel
mailing list