[Bash-completion-devel] Bug#766163: bash-completion: _tilde calls compgen w/o "--" argument protection
Nikolaus Schulz
nikolaus.schulz at avionic-design.de
Tue Oct 21 09:22:49 UTC 2014
Package: bash-completion
Version: 1:2.1-4
Severity: minor
Hi,
when tilde-expanding in function _tilde(), the following line
COMPREPLY=( $( compgen -P '~' -u "${1#\~}" ) )
does not protect $1 by preceding it with "--", which means that if $1 starts
with ~- (the $OLDPWD tilde-prefix), compgen will try to interpret characters
after the - as options.
Example: tab-completion of of "mv ~-o":
$ mv ~-obash: compgen: -o: option requires an argument
compgen: usage: compgen [-abcdefgjksuv] ...
Nothing too terrible, but still ugly, and easily fixed.
Thanks and have a nice day,
Nikolaus
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16-2-amd64 (SMP w/8 CPU cores)
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.3-11
ii dpkg 1.17.13
bash-completion recommends no packages.
bash-completion suggests no packages.
-- no debconf information
--
Avionic Design GmbH
Nikolaus Schulz
Wragekamp 10
D-22397 Hamburg
Germany
Tel.: +49 40 88187-163
Fax: +49 40 88187-150
Email: nikolaus.schulz at avionic-design.de
Avionic Design GmbH
Amtsgericht Hamburg HRB 82598
Geschäftsführung: Cornelis Broers
Ust.-Ident-Nr.: DE813378254
More information about the Bash-completion-devel
mailing list