Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: qpdf or bashcompinit completion bug
On 2025-08-18 21:41:55 -0400, Eric Cook wrote:
> On 8/18/25 9:35 PM, Vincent Lefevre wrote:
> > On 2025-08-18 21:13:56 -0400, Eric Cook wrote:
> > > On 8/18/25 8:54 PM, Vincent Lefevre wrote:
> > >
> > > > Moreover, independently of the above issue, bashcompinit defines
> > > > 2 additional functions: compgen (mentioned above) and complete.
> > > > Their names are likely to clash with user-defined functions.
> > > > Shouldn't their names start with an underscore, and even some
> > > > prefix like "_bash_"?
> > >
> > > They exist for completers designed for bash, renaming them would
> > > break the most of them.
> > >
> > > grep -rF '$(compgen' /path/to/bash-completion/completions
> >
> > But are they used by zsh?
>
> compgen() and complete() aren't used by zsh, since zsh has other
> means to achieve what they perform. However since bashcompinit is
> for getting bash completers to `work' within zsh unmodified, they
> are needed since the compgen and complete bash builtins are commonly
> called within bash completers, changing their names would break the
> primary purpose of bashcompinit.
I meant: Are these bash completers used in practice under zsh?
I suppose that there is no guarantee that they would be compatible
with zsh.
Moreover, these bash completers could define other functions
that may clash with zsh or user-defined functions. For instance,
/path/to/bash-completion/completions/pactl defines the in_array
function.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author