From 2b19c0bc685fc2f726b977d161e6ce720a4d04a8 Mon Sep 17 00:00:00 2001 From: ptzz Date: Sat, 2 Jun 2018 03:40:33 +0200 Subject: [bash/zsh] Fix missing fuzzy completions (#1303) * [bash/zsh] Fix missing fuzzy completions `cat foo**` did not display the file `foobar` if there was a directory named `foo`. Fixes #1301 * [zsh] Evaluate completion prefix cat $HOME** cat ~username** cat ~username/foo** --- shell/completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell/completion.bash') diff --git a/shell/completion.bash b/shell/completion.bash index b3d28f28..86b78526 100644 --- a/shell/completion.bash +++ b/shell/completion.bash @@ -148,7 +148,7 @@ __fzf_generic_path_completion() { base=${cur:0:${#cur}-${#trigger}} eval "base=$base" - dir="$base" + [[ $base = *"/"* ]] && dir="$base" while true; do if [ -z "$dir" ] || [ -d "$dir" ]; then leftover=${base/#"$dir"} -- cgit v1.2.3