mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2025-01-08 17:24:05 +00:00
Fix bash completion (~/abc/def/ghi**)
~/abc/def/ghi** should match ghi under ~/abc/def/, not ~/abc/def*
This commit is contained in:
parent
89ae45cda4
commit
9a49a29c7f
@ -45,7 +45,7 @@ _fzf_generic_completion() {
|
||||
if [ -z "$dir" -o -d "$dir" ]; then
|
||||
leftover=${base/#"$dir"}
|
||||
leftover=${leftover/#\/}
|
||||
[ "$dir" = '.' ] && dir=''
|
||||
[ "$dir" = './' ] && dir=''
|
||||
matches=$(find "$dir"* $1 2> /dev/null | fzf $FZF_COMPLETION_OPTS $2 -q "$leftover" | while read item; do
|
||||
if [[ ${item} =~ \ ]]; then
|
||||
echo -n "\"$item\" "
|
||||
@ -62,6 +62,7 @@ _fzf_generic_completion() {
|
||||
return 0
|
||||
fi
|
||||
dir=$(dirname "$dir")
|
||||
[[ "$dir" =~ /$ ]] || dir="$dir"/
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user