#70403 closed enhancement (fixed)
qpdf: add shell completion
| Reported by: | contextnerror | Owned by: | Schamschula (Marius Schamschula) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | Cc: | ||
| Port: | qpdf |
Description
qpdf seems to support shell completion, but at the moment the port does not appear to take advantage of it. Could this be implemented?
Change History (7)
comment:1 Changed 2 years ago by Schamschula (Marius Schamschula)
comment:2 Changed 2 years ago by contextnerror
Indeed, but there is also a completion file available. I was hoping that the port could install this file.
comment:3 Changed 2 years ago by Schamschula (Marius Schamschula)
I rebuilt qpdf to look for completion files. The default install script should have installed everything.
Let me know if you find the file(s). I can report the issue upstream.
comment:4 Changed 2 years ago by contextnerror
The files are located in the "completions" folder, under "bash" and "zsh" respectively.
My understanding is that not installing the files is the intended behavior. Documentation claims that "qpdf's install targets do not install completion files by default since there is no standard location for them".
comment:5 Changed 2 years ago by Schamschula <mps@…>
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:6 Changed 2 years ago by contextnerror
Completion does not currently work because the file hardcodes /usr/bin/qpdf
comment:7 Changed 2 years ago by Schamschula (Marius Schamschula)
Thanks for that report!
I've added a reinplace script to add the proper path.
See: https://github.com/macports/macports-ports/commit/94f3971836016237d72708852639750f0003c0aa

See the qpdf(1) man page:
COMPLETION (shell completion) Shell completion is supported with bash and zsh. Use eval $(qpdf --completion-bash) or eval $(qpdf --completion-zsh) to enable. The QPDF_EXECUTABLE environment variable overrides the path to qpdf that these commands output. Related Options: --completion-bash -- enable bash completion Output a command that enables bash completion --completion-zsh -- enable zsh completion Output a command that enables zsh completion