[Bash-completion-devel] Bug#648319: Bug#648319: bash-completion: /etc/bash_completion script doesn't do the job

Ville Skyttä ville.skytta at iki.fi
Wed Jan 11 18:59:19 UTC 2012


On 2012-01-11 15:41, David Paleino wrote:
> On Wed, 11 Jan 2012 02:39:43 -0600, Jonathan Nieder wrote:
>
>> Probably something like
>>
>>     local compscript=$(readlink -f "$BASH_SOURCE")
>>     [[ $compscript == */* ]] && compdir="${compscript%/*}/completions"
>>
>> in its place would do the trick.
> 
> Oh, thanks for the quick fix, and thanks for finding the bug :)
> 
> The proposed patch makes perfectly sense, thanks Jonathan! I committed it
> upstream, and I just uploaded 1.99-3 to the repositories.

I think this is not appropriate upstream and should be reverted there.

First, the readlink command does not exist everywhere.

Second, I don't think it's at all clear that if someone loads
bash_completion through a symlink, (s)he wouldn't want the completions
dir to be found relative to the symlink but rather whatever the symlink
points to.





More information about the Bash-completion-devel mailing list