2
0
mirror of https://github.com/junegunn/fzf synced 2024-10-30 09:20:14 +00:00

[completion] Restore --height option for kill completion

This commit is contained in:
Junegunn Choi 2017-01-15 22:02:04 +09:00
parent e0036b5ad2
commit 44d3faa048
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
2 changed files with 2 additions and 2 deletions

View File

@ -215,7 +215,7 @@ _fzf_complete_kill() {
local selected fzf
fzf="$(__fzfcmd_complete)"
selected=$(ps -ef | sed 1d | FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap --min-height 15 $FZF_COMPLETION_OPTS" $fzf -m | awk '{print $2}' | tr '\n' ' ')
selected=$(ps -ef | sed 1d | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS" $fzf -m | awk '{print $2}' | tr '\n' ' ')
printf '\e[5n'
if [ -n "$selected" ]; then

View File

@ -163,7 +163,7 @@ fzf-completion() {
# Kill completion (do not require trigger sequence)
if [ $cmd = kill -a ${LBUFFER[-1]} = ' ' ]; then
fzf="$(__fzfcmd_complete)"
matches=$(ps -ef | sed 1d | FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap --min-height 15 $FZF_COMPLETION_OPTS" ${=fzf} -m | awk '{print $2}' | tr '\n' ' ')
matches=$(ps -ef | sed 1d | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS" ${=fzf} -m | awk '{print $2}' | tr '\n' ' ')
if [ -n "$matches" ]; then
LBUFFER="$LBUFFER$matches"
fi