From b44ab9e33c236787bcd00b655cae4a8ef8497059 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 6 Jul 2024 10:20:00 +0900 Subject: [PATCH] [completion] Use --wrap option in process completion And remove the short preview window for showing the whole command. Because it is important to be able to see the whole command before deciding to kill it. --- shell/completion.bash | 3 ++- shell/completion.zsh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/completion.bash b/shell/completion.bash index c63ef33..8ad7b3a 100644 --- a/shell/completion.bash +++ b/shell/completion.bash @@ -167,6 +167,7 @@ _fzf_opts_completion() { --version --with-nth --with-shell + --wrap --zsh -0 --exit-0 -1 --select-1 @@ -407,7 +408,7 @@ _fzf_complete_kill() { } _fzf_proc_completion() { - _fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <( + _fzf_complete -m --header-lines=1 --no-preview --wrap -- "$@" < <( command ps -eo user,pid,ppid,start,time,command 2> /dev/null || command ps -eo user,pid,ppid,time,args # For BusyBox ) diff --git a/shell/completion.zsh b/shell/completion.zsh index 4786bbd..1ff4a4b 100644 --- a/shell/completion.zsh +++ b/shell/completion.zsh @@ -298,7 +298,7 @@ _fzf_complete_unalias() { } _fzf_complete_kill() { - _fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <( + _fzf_complete -m --header-lines=1 --no-preview --wrap -- "$@" < <( command ps -eo user,pid,ppid,start,time,command 2> /dev/null || command ps -eo user,pid,ppid,time,args # For BusyBox )