[Bash-completion-devel] Bug#663732: bash-completion: Kernel modules completion is wrong

Yoric Kotchukov yoric-k at yandex.ru
Tue Mar 13 16:24:51 UTC 2012


Package: bash-completion
Version: 1:1.99-3
Severity: normal

Hello!

Example:
globus at aspera:~$ modinfo kvm(here 'Tab' for autocompletion) = ls: cannot access /lib/modules/3.2.0-1-amd64/source/Kbuild: No such file or directory
People in the know told that "That seems to be a bug in the hell completion function for module names; it should never follow the build or source symlinks.
The completion function is:

_modules()
{
    local modpath
    modpath=/lib/modules/$1
    COMPREPLY=( $( compgen -W "$( command ls -RL $modpath | \
        sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.gz\)\{0,1\}$/\1/p' )" -- "$cur" ) )
}

The '-L' option has been wrongly added at some point (it isn't present
in the version in squeeze)."

Thank for attention.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'testing')
Architecture: i386 (x86_64)

Kernel: Linux 3.2.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash-completion depends on:
ii  bash  4.2-1

bash-completion recommends no packages.

bash-completion suggests no packages.

-- no debconf information





More information about the Bash-completion-devel mailing list