From 302e21fd5813a3c4c7f6014367988829fc92770a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 1 Apr 2023 19:52:34 +0900 Subject: [shell] Update kill completion * Explicitly specify the list of fields for consistent experience * Add fallback command for BusyBox (Close #3219) * Apply `--header-lines=1` to show the column header --- shell/completion.bash | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'shell/completion.bash') diff --git a/shell/completion.bash b/shell/completion.bash index 836f4b54..9474ea03 100644 --- a/shell/completion.bash +++ b/shell/completion.bash @@ -270,8 +270,9 @@ _fzf_complete_kill() { } _fzf_proc_completion() { - _fzf_complete -m --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <( - command ps -ef | sed 1d + _fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <( + command ps -eo user,pid,ppid,start,time,command 2> /dev/null || + command ps -eo user,pid,ppid,time,args # For BusyBox ) } -- cgit v1.2.3