Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: qpdf or bashcompinit completion bug
On 2025-08-18 23:17:25 +0200, Vincent Lefevre wrote:
> On 2025-08-18 13:39:41 -0700, Bart Schaefer wrote:
> > The whole thing needs to be followed by (I think) a call to _bash_complete
> > ... I'm not 100% sure of that as I don't have all the prerequisites.
>
> This seems to fix the problem. So, the _qpdf file should have
>
> #compdef qpdf
> eval $(/usr/bin/qpdf --completion-zsh)
> _bash_complete
Actually, this isn't correct either. With or without _bash_complete,
there is an issue if compdump is used once one has invoked a qpdf
completion; the following line appears in the .zcompdump file:
'qpdf' '_bash_complete -o bashdefault -o default -C /usr/bin/qpdf'
This is due to the
complete -o bashdefault -o default -C "/usr/bin/qpdf" qpdf
from the eval line.
Thus, in a new shell session, the completion command for qpdf is
_bash_complete -o bashdefault -o default -C /usr/bin/qpdf
But _bash_complete has not been loaded yet! So a [Tab] gives:
qaa:~> qpdf (eval):1: command not found: _bash_complete
(eval):1: command not found: _bash_complete
(eval):1: command not found: _bash_complete
What is the cleanest solution?
--
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