Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: qpdf or bashcompinit completion bug



On 2025-08-18 12:33:58 -0700, Bart Schaefer wrote:
> On Mon, Aug 18, 2025 at 12:27 PM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> 
> >
> > #compdef qpdf
> > eval $(/usr/bin/qpdf --completion-zsh)
> >
> > and "/usr/bin/qpdf --completion-zsh" just outputs:
> >
> > autoload -U +X bashcompinit && bashcompinit && complete -o bashdefault -o
> > default -C "/usr/bin/qpdf" qpdf
> >
> 
> Theoretically that "complete -o ..." should invoke the actual completion
> after everything is set up.  Is it possible that bashcompinit is returning
> nonzero?  Or even that "autoload ..." is doing so?

Let's see...

qaa% autoload -U compinit
qaa% compinit
qaa% autoload -U +X bashcompinit
qaa% echo $?
0
qaa% bashcompinit
qaa% echo $?
0
qaa% autoload -U +X bashcompinit
qaa% echo $?
0
qaa% bashcompinit
qaa% echo $?
0

> Possibly because bashcompinit has previously been run in the current
> session?

I've done the test several times after "zsh -f", "autoload -U compinit"
and "compinit".

But even when bashcompinit has already been run, the exit status is
still 0 as you can see above.

-- 
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