Fixed errors with POSIX enabled (Closes: #502804)

This commit is contained in:
David Paleino 2008-10-24 19:17:23 +02:00
parent 606860000c
commit b3f3017a46
2 changed files with 30 additions and 16 deletions

View File

@ -269,16 +269,23 @@ _filedir()
_expand || return 0
local toks=( ) tmp
while read -r tmp; do
[[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
done < <( compgen -d -- "$(quote_readline "$cur")" )
toks=( ${toks[@]} $(
compgen -d -- "$(quote_readline "$cur")" | {
while read -r tmp; do
[[ -n $tmp ]] && echo $tmp
done
}
))
if [[ "$1" != -d ]]; then
xspec=${1:+"!*.$1"}
while read -r tmp; do
[[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
done < <( compgen -f -X "$xspec" -- "$(quote_readline "$cur")" )
toks=( ${toks[@]} $(
compgen -f -X "$xspec" -- "$(quote_readline "$cur")" | {
while read -r tmp; do
[[ -n $tmp ]] && echo $tmp
done
}
))
fi
COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )
@ -9570,15 +9577,21 @@ _filedir_xspec()
xspec=${xspec#*-X }
xspec=${xspec%% *}
local toks=( ) tmp
toks=( $(
compgen -d -- "$(quote_readline "$cur")" | {
while read -r tmp; do
[[ -n $tmp ]] && echo $tmp
done
}
))
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 < <( eval compgen -f -X $xspec -- "\$(quote_readline "\$cur")" )
toks=( ${toks[@]} $(
eval compgen -f -X $xspec -- "\$(quote_readline "\$cur")" | {
while read -r tmp; do
[[ -n $tmp ]] && echo $tmp
done
}
))
COMPREPLY=( "${toks[@]}" )
}

3
debian/changelog vendored
View File

@ -29,9 +29,10 @@ bash-completion (200809xx) UNRELEASED; urgency=low
* Added apache2ctl completion
* Added gpg2 completion (Closes: #489927)
* Fixed mplayer -skin completion (Closes: #501473)
* Fixed errors with POSIX enabled (Closes: #502804)
* debian/links fixed (Closes: #494292)
-- David Paleino <d.paleino@gmail.com> Fri, 24 Oct 2008 19:07:34 +0200
-- David Paleino <d.paleino@gmail.com> Fri, 24 Oct 2008 19:16:44 +0200
bash-completion (20080705) unstable; urgency=low