diff options
| author | Kobe Lipkens <kobelipkens@gmail.com> | 2015-12-28 21:11:04 +0100 |
|---|---|---|
| committer | Kobe Lipkens <kobelipkens@gmail.com> | 2015-12-28 21:11:04 +0100 |
| commit | 6208fc9cfd96c4e64dd1cc03b947be6ee6a393c8 (patch) | |
| tree | 086c791e50f63c13c97a9068e7fe2e6a777f539d /shell/completion.bash | |
| parent | e1dd798482490db6c43158d418973aa6e61659b7 (diff) | |
| download | fzf-6208fc9cfd96c4e64dd1cc03b947be6ee6a393c8.tar.gz | |
Fix autocompletion for absolute paths
Diffstat (limited to 'shell/completion.bash')
| -rw-r--r-- | shell/completion.bash | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/completion.bash b/shell/completion.bash index 191091d0..ef3a965c 100644 --- a/shell/completion.bash +++ b/shell/completion.bash @@ -110,7 +110,8 @@ __fzf_generic_path_completion() { if [ -z "$dir" -o -d "$dir" ]; then leftover=${base/#"$dir"} leftover=${leftover/#\/} - [ -z "$dir" ] && dir='.' || dir="${dir/%\//}" + [ -z "$dir" ] && dir='.' + [ "$dir" != "/" ] && dir="${dir/%\//}" tput sc matches=$(\find -L "$dir" $1 -a -not -path "$dir" -print 2> /dev/null | sed 's@^\./@@' | $fzf $FZF_COMPLETION_OPTS $2 -q "$leftover" | while read item; do printf "%q$3 " "$item" |
