[Bash-completion-devel] [SCM] bash-completion branch, master, updated. 1.3-512-g9717124
Ville Skyttä
ville.skytta at iki.fi
Tue Nov 8 16:21:21 UTC 2011
On 11/08/2011 04:54 AM, Igor Murzov wrote:
> On Mon, 07 Nov 2011 18:41:16 +0200
> Ville Skyttä <ville.skytta at iki.fi> wrote:
>
>>> I pushed new variant of the fix to the "service" branch. Can you look into it?
>>
>> I didn't look into the code that closely, but it works as expected in
>> all test cases I threw at it, cool.
>
> Good. Can I push this variant to the master branch?
Sure, go ahead.
But I've run into something not nice at all (and not at all related to
your changes):
$ bash --norc
$ _foo() { echo -n completing foo ; }
$ _loader() { echo -n loading for $1; complete -F _foo $1; return 124; }
$ complete -D -F _loader
$ foo <TAB>loading for foocompleting foo
So far, so good. But then:
$ /etc/init.d/foo <TAB>completing foo
So if completion for a basename foo is already installed, the default
completion loader no longer fires for /etc/init.d/foo -- the basename
completion is invoked directly instead. (It works ok the other way
around, i.e. if /etc/init.d/foo is completed first, then plain foo later.)
I can't believe I missed this when testing various dynamic loading
scenarios. And I'm afraid this means that we'll need to load
completions for /etc/init.d and friends eagerly at bash_completion load
time after all :(
More information about the Bash-completion-devel
mailing list