[Bash-completion-devel] Bug#674159: aptitude: completes filenames when it shouldn't

Reuben Thomas rrt at sc3d.org
Wed May 23 13:31:43 UTC 2012


Package: bash-completion
Version: 1:1.3-1ubuntu8
Severity: minor

bash-completion for aptitude should not perform filename completion on
certain commands. As the code says:

        # don't complete anything if these options are found
        autoclean|clean|forget-new|search|safe-upgrade|upgrade|update|keep-all)
            return 0
            ;;

Unfortunately, readline filename completion is always performed,
because complete is called with -o default:

complete -F _aptitude -o default aptitude

The basic solution, therefore, is to remove "-o default". This risks
failing to complete filenames in some situations in which it is
required; however, looking at aptitude(1), I see no place in which a
filename is required other than after -S, which is already catered
for.

-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 'precise')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-23-lowlatency (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash-completion depends on:
ii  bash  4.2-2ubuntu2
ii  dpkg  1.16.1.2ubuntu7

bash-completion recommends no packages.

bash-completion suggests no packages.

-- no debconf information





More information about the Bash-completion-devel mailing list