diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2020-02-20 16:36:59 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2020-02-20 16:36:59 +0900 |
commit | 9897ee959186f2c8d5908966c10cb6593df945a1 (patch) | |
tree | 68e7676d2fae9c53a44c954abc71a495d148259b | |
parent | 52154153150d0014a76ef8b429b73c590cb7f755 (diff) |
[bash] Strip trailing whitespace on kill completion
-rw-r--r-- | shell/completion.bash | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/completion.bash b/shell/completion.bash index 47d01e8b..b953cc8a 100644 --- a/shell/completion.bash +++ b/shell/completion.bash @@ -233,6 +233,7 @@ _fzf_complete_kill() { local selected selected=$(command ps -ef | sed 1d | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --min-height 15 --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS --preview 'echo {}' --preview-window down:3:wrap" __fzf_comprun "kill" -m | awk '{print $2}' | tr '\n' ' ') + selected=${selected% } printf '\e[5n' if [ -n "$selected" ]; then |