Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#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 months ago by Schamschula (Marius Schamschula)

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

comment:2 Changed 2 months 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 months 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 months 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 months ago by Schamschula <mps@…>

Resolution: fixed
Status: assignedclosed

In 767a29e366b669ba7e30421378d0c945ff4c6c6a/macports-ports (master):

qpdf: install bash and zsh completions

Closes: #70403

comment:6 Changed 2 months ago by contextnerror

Completion does not currently work because the file hardcodes /usr/bin/qpdf

comment:7 Changed 2 months 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

Note: See TracTickets for help on using tickets.