bash completions: work correctly when $cur is an empty string.
Otherwise 'cd t/defaults-flat' then 'redo <tab>' doesn't show all the possible targets.
This commit is contained in:
parent
70923c5f30
commit
3c256dee9b
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ __redo_completions()
|
|||
"$__redo_targets" |
|
||||
while read name; do
|
||||
rest=${name#$cur}
|
||||
[ "$rest" = "$name" ] && continue
|
||||
[ "$cur$rest" != "$name" ] && continue
|
||||
name2="$cur${rest%%/*}"
|
||||
[ -e "$name2/." ] || echo "$name2"
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue