refactored _filedir_xspec using quote_readline()

This commit is contained in:
David Paleino 2008-06-23 11:58:40 +02:00
parent 5fea870b81
commit 7fcc788d45
2 changed files with 13 additions and 4 deletions

View File

@ -9382,9 +9382,17 @@ _filedir_xspec()
xspec=${xspec#*-X } xspec=${xspec#*-X }
xspec=${xspec%% *} xspec=${xspec%% *}
COMPREPLY=( $( eval compgen -f -X "$xspec" -- \ local toks=( ) tmp
\"${cur#[\`\"\']}\" 2>/dev/null ) \
$( compgen -d -- $cur ) ) while read -r tmp; do
[[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
done < <( compgen -d -- "$(quote_readline "$cur")" )
while read -r tmp; do
[[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
done < <( compgen -f -X $xspec -- "\$(quote_readline "\$cur")" )
COMPREPLY=( "${toks[@]}" )
} }
list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' \ list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' \
$BASH_COMPLETION | \ $BASH_COMPLETION | \

3
debian/changelog vendored
View File

@ -5,6 +5,7 @@ bash-completion (20080617.4) UNRELEASED; urgency=low
- added _remove_word() - added _remove_word()
- fixed _get_cword() - fixed _get_cword()
- refactored _filedir using quote_readline() - refactored _filedir using quote_readline()
- refactored _filedir_xspec using quote_readline()
- fixed COMPREPLY's in _iwconfig - fixed COMPREPLY's in _iwconfig
- fixed _cvs() - fixed _cvs()
- _known_hosts(): use files from UserKnownHostsFile options in - _known_hosts(): use files from UserKnownHostsFile options in
@ -16,7 +17,7 @@ bash-completion (20080617.4) UNRELEASED; urgency=low
- added flv/FLV completion to mplayer - added flv/FLV completion to mplayer
- only complete on filenames for aspell - only complete on filenames for aspell
-- David Paleino <d.paleino@gmail.com> Mon, 23 Jun 2008 11:55:31 +0200 -- David Paleino <d.paleino@gmail.com> Mon, 23 Jun 2008 11:58:16 +0200
bash-completion (20080617.3) unstable; urgency=low bash-completion (20080617.3) unstable; urgency=low