[Bash-completion-commits] ./current r1143: refactored _filedir_xspec using quote_readline()
David Paleino
d.paleino at gmail.com
Mon Jun 23 09:58:40 UTC 2008
------------------------------------------------------------
revno: 1143
committer: David Paleino <d.paleino at gmail.com>
branch nick: current
timestamp: Mon 2008-06-23 11:58:40 +0200
message:
refactored _filedir_xspec using quote_readline()
modified:
bash_completion
debian/changelog
-------------- next part --------------
=== modified file 'bash_completion'
--- a/bash_completion 2008-06-23 09:55:45 +0000
+++ b/bash_completion 2008-06-23 09:58:40 +0000
@@ -9382,9 +9382,17 @@
xspec=${xspec#*-X }
xspec=${xspec%% *}
- COMPREPLY=( $( eval compgen -f -X "$xspec" -- \
- \"${cur#[\`\"\']}\" 2>/dev/null ) \
- $( compgen -d -- $cur ) )
+ local toks=( ) tmp
+
+ 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' \
$BASH_COMPLETION | \
=== modified file 'debian/changelog'
--- a/debian/changelog 2008-06-23 09:55:45 +0000
+++ b/debian/changelog 2008-06-23 09:58:40 +0000
@@ -5,6 +5,7 @@
- added _remove_word()
- fixed _get_cword()
- refactored _filedir using quote_readline()
+ - refactored _filedir_xspec using quote_readline()
- fixed COMPREPLY's in _iwconfig
- fixed _cvs()
- _known_hosts(): use files from UserKnownHostsFile options in
@@ -16,7 +17,7 @@
- added flv/FLV completion to mplayer
- only complete on filenames for aspell
- -- David Paleino <d.paleino at gmail.com> Mon, 23 Jun 2008 11:55:31 +0200
+ -- David Paleino <d.paleino at gmail.com> Mon, 23 Jun 2008 11:58:16 +0200
bash-completion (20080617.3) unstable; urgency=low
More information about the Bash-completion-commits
mailing list