#1127788 qpdf: bash completion seems to be totally broken

Package:
qpdf
Source:
qpdf
Description:
tools for transforming and inspecting PDF files
Submitter:
Francesco Poli (wintermute)
Date:
2026-02-12 23:23:02 UTC
Severity:
normal
#1127788#5
Date:
2026-02-12 23:22:09 UTC
From:
To:
Hello and thanks for maintaining qpdf!

I would like to point out that its bash completion seems to be totally
broken.

For instance:

    $ ls
    foo.pdf
    $ qpdf fo

if I now hit [Tab], I get the following awkward result:

    $ qpdf fo
    qpdf: an input file name is required

    For help:
      qpdf --help=usage       usage information
      qpdf --help=topic       help on a topic
      qpdf --help=--option    help on an option
      qpdf --help             general help and a topic list

    o.pdf

The problema seems to lie in the qpdf executable itself, which is
supposed to be able to generated its own bash completion code:

    $ dpkg -L qpdf | grep bash-completion
    /usr/share/bash-completion
    /usr/share/bash-completion/completions
    /usr/share/bash-completion/completions/qpdf
    $ cat /usr/share/bash-completion/completions/qpdf
    eval "$(/usr/bin/qpdf --completion-bash)"

but:

    $ /usr/bin/qpdf --completion-bash
    qpdf_completer() { '/usr/bin/qpdf'; }; complete -o bashdefault -o default -o nospace -F qpdf_completer qpdf

I am no expert of bash completion code, but the qpdf_completer()
function does not look like a working bash completion function...

What's wrong?
Is there anything I failed to understand?

Please clarify or fix the bug.


Thanks for your time and dedication!