grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] bash-completion: Remove obsolete usage of 'have' function


From: Andrei Borzenkov
Subject: Re: [PATCH] bash-completion: Remove obsolete usage of 'have' function
Date: Sun, 7 Dec 2014 21:37:00 +0300

В Sun, 7 Dec 2014 18:23:13 +0000 (UTC)
Justin <address@hidden> пишет:

> Andrei Borzenkov <arvidjaar <at> gmail.com> writes:
> 
> >
> > В Fri,  5 Dec 2014 22:22:23 -0500
> > Mike Gilbert <floppym <at> gentoo.org> пишет:
> >
> > > Recent versions of bash-completion do not provide the 'have' function.
> >
> > It still does as of today GIT.
> >
> 
> 
> # Backwards compatibility for compat completions that use have().
> # @deprecated should no longer be used; generally not needed with dynamically
> #             loaded completions, and _have is suitable for runtime use.
> have()
> {
>     unset -v have
>     _have  && have=yes
> }
> 
> All major Linux distributions are using bash-completion version which support
> dynamically loaded completions. Therefor we should cleanup shipped
> bash-completions.
> 
> > > To keep things simple, this patch just removes it completely.
> >
> > No, that is not what was intended when 'have' was deprecated. You should
> > put completion for each command in separate function which is then
> > autoloaded on demand.
> 
> It was intended that you have one file (or a symlink) with the name of the
> command which will be completed. That means dropping all have and pointing
> symlinks with all support completions will fix it.
> 

That was what I meant. Sorry, had to say "file" not "function".

> Or how would you update to recent bash-completion?
>

bash-completion will process /etc/bash_completion.d and will source
current grub completion just fine. But if you want to really adapt
it, just removing calls to have() is not enough; you also need to fix
install target and probably split it in separate files for each command.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]