summaryrefslogtreecommitdiff
path: root/shell/completion.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'shell/completion.zsh')
-rw-r--r--shell/completion.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/completion.zsh b/shell/completion.zsh
index bd478e55..417d03c0 100644
--- a/shell/completion.zsh
+++ b/shell/completion.zsh
@@ -146,7 +146,8 @@ __fzf_generic_path_completion() {
[ -z "$dir" ] && dir='.'
[ "$dir" != "/" ] && dir="${dir/%\//}"
matches=$(eval "$compgen $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" __fzf_comprun "$cmd" ${(Q)${(Z+n+)fzf_opts}} -q "$leftover" | while read item; do
- echo -n "${(q)item}$suffix "
+ item="${item%$suffix}$suffix"
+ echo -n "${(q)item} "
done)
matches=${matches% }
if [ -n "$matches" ]; then