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

2025-12-12 Thread Samuel Plavec
This issue disappears when I change the last line of
/usr/share/bash-completion/completions/apt-file from:
> complete -f -F _apt_file apt-file
to:
> complete -F _apt_file apt-file

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?

--
Samuel Plavec



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

2025-12-10 Thread Samuel Plavec
Package: apt-file
Version: 3.3
Severity: minor

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

-- System Information:
Debian Release: 13.2
 APT prefers stable-updates
 APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.57+deb13-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages apt-file depends on:
ii  apt  3.0.3
ii  libapt-pkg-perl  0.1.42
ii  libregexp-assemble-perl  0.38-2
ii  perl 5.40.1-6

apt-file recommends no packages.

apt-file suggests no packages.

-- no debconf information