Skip to content
Snippets Groups Projects
Unverified Commit a5a97be0 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

[bash-completion] Properly handle exit event

Related #1704
parent 80b5bc1b
No related branches found
No related tags found
No related merge requests found
......@@ -195,12 +195,13 @@ _fzf_complete() {
selected=$(cat | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" $fzf $1 -q "$cur" | $post | tr '\n' ' ')
selected=${selected% } # Strip trailing space not to repeat "-o nospace"
printf '\e[5n'
if [ -n "$selected" ]; then
COMPREPLY=("$selected")
return 0
else
COMPREPLY=("$cur")
fi
printf '\e[5n'
return 0
else
shift
_fzf_handle_dynamic_completion "$cmd" "$@"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment