From 2c15cd792306119ead573c473c982b6996e11952 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 26 Jan 2025 16:11:15 +0900 Subject: [PATCH] [completion] Make kill completion header clickable --- shell/completion.bash | 3 ++- shell/completion.zsh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/completion.bash b/shell/completion.bash index afdb9476..aa15b8ca 100644 --- a/shell/completion.bash +++ b/shell/completion.bash @@ -409,7 +409,8 @@ _fzf_complete_kill() { } _fzf_proc_completion() { - _fzf_complete -m --header-lines=1 --no-preview --wrap -- "$@" < <( + _fzf_complete -m --header-lines=1 --no-preview --wrap --color fg:dim,nth:regular \ + --bind 'click-header:transform:echo "change-nth($FZF_CLICK_HEADER_NTH)+change-prompt($FZF_CLICK_HEADER_WORD> )"' -- "$@" < <( command ps -eo user,pid,ppid,start,time,command 2> /dev/null || command ps -eo user,pid,ppid,time,args 2> /dev/null || # For BusyBox command ps --everyone --full --windows # For cygwin diff --git a/shell/completion.zsh b/shell/completion.zsh index 70c43e29..9979933e 100644 --- a/shell/completion.zsh +++ b/shell/completion.zsh @@ -290,7 +290,8 @@ _fzf_complete_unalias() { } _fzf_complete_kill() { - _fzf_complete -m --header-lines=1 --no-preview --wrap -- "$@" < <( + _fzf_complete -m --header-lines=1 --no-preview --wrap --color fg:dim,nth:regular \ + --bind 'click-header:transform:echo "change-nth($FZF_CLICK_HEADER_NTH)+change-prompt($FZF_CLICK_HEADER_WORD> )"' -- "$@" < <( command ps -eo user,pid,ppid,start,time,command 2> /dev/null || command ps -eo user,pid,ppid,time,args 2> /dev/null || # For BusyBox command ps --everyone --full --windows # For cygwin