Skip to content
Myr

[bash-completion] Properly handle exit event

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Related #1704

authored by Junegunn Choi · committed by Junegunn Choi · parent 80b5bc1 · Browse files · 1 file+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:shell/completion.bash+4 added-3 removed
193 unmodified lines
194 cur=${cur:0:${#cur}-${#trigger}}195196 selected=$(cat | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" $fzf $1 -q "$cur" | $post | tr '\n' ' ')197 selected=${selected% } # Strip trailing space not to repeat "-o nospace"198 printf '\e[5n'199198 if [ -n "$selected" ]; then199 COMPREPLY=("$selected")202 return 0200 else201 COMPREPLY=("$cur")202 fi203 printf '\e[5n'204 return 0205 else206 shift207 _fzf_handle_dynamic_completion "$cmd" "$@"208 fi
145 unmodified lines