#1122387 apt-file: Bash suggests filenames for the first argument

#1122387#5
Date:
2025-12-10 20:18:28 UTC
From:
To:
Dear Maintainer,

According to the manpage, a valid first argument for apt-file is
either an action or an option.
However, when I type "apt-file " (without the quotes) and press tab
twice, bash suggests actions
(find, list, search, show, update), and also files in the current
directory. I believe bash should
not suggest filenames for the first argument.

Best regards,
Samuel Plavec

#1122387#10
Date:
2025-12-12 15:08:30 UTC
From:
To:
This issue disappears when I change the last line of
/usr/share/bash-completion/completions/apt-file from:
to:

After this fix, completion works for the usual apt-file actions.
However, it seems that completion hasn't been implemented for several
features of apt-file (such as list-indices or --filter-suites). Maybe
the purpose of the -f flag is to provide fallback completion for them?