From 6532b3e655c765c79feaa5936d8e686d943c1e4e Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 22 Aug 2022 22:29:51 +0900 Subject: [completion] Remove extra trailing slash on directory completion Fix #2931 --- shell/completion.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shell/completion.zsh') 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 -- cgit v1.2.3