summaryrefslogtreecommitdiff
path: root/shell/completion.bash
diff options
context:
space:
mode:
authorptzz <ponca707@gmail.com>2018-06-02 03:40:33 +0200
committerJunegunn Choi <junegunn.c@gmail.com>2018-06-02 10:40:33 +0900
commit2b19c0bc685fc2f726b977d161e6ce720a4d04a8 (patch)
tree8a7bad332c6e651d1bd489fb9cb52d165d375ed1 /shell/completion.bash
parent76a2dcb5a95c3027eeb811c0abb9331928c13653 (diff)
downloadfzf-2b19c0bc685fc2f726b977d161e6ce720a4d04a8.tar.gz
[bash/zsh] Fix missing fuzzy completions (#1303)
* [bash/zsh] Fix missing fuzzy completions `cat foo**<TAB>` 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**
Diffstat (limited to 'shell/completion.bash')
-rw-r--r--shell/completion.bash2
1 files changed, 1 insertions, 1 deletions
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"}