From 280d471d84156e4a491b626c89ff7ea43fb7dd82 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 1 Dec 2018 14:19:12 +1300 Subject: Remove `kill` completion Completing PIDs is stupid, in retrospect. --- bash/bash_completion.d/kill.bash | 16 ---------------- bash/bashrc.d/completion.bash | 3 ++- 2 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 bash/bash_completion.d/kill.bash (limited to 'bash') diff --git a/bash/bash_completion.d/kill.bash b/bash/bash_completion.d/kill.bash deleted file mode 100644 index bdb42ec1..00000000 --- a/bash/bash_completion.d/kill.bash +++ /dev/null @@ -1,16 +0,0 @@ -# Complete kill builtin with jobspecs (prefixed with % so it will accept them) -# and this user's PIDs (requires pgrep(1)) -_kill() { - local pid - while read -r pid ; do - case $pid in - "$2"*) - COMPREPLY[${#COMPREPLY[@]}]=$pid - ;; - esac - done < <( { - compgen -A job -P% - pgrep -u "$USER" . - } 2>/dev/null ) -} -complete -F _kill kill diff --git a/bash/bashrc.d/completion.bash b/bash/bashrc.d/completion.bash index bdcdfe57..ff3a95c1 100644 --- a/bash/bashrc.d/completion.bash +++ b/bash/bashrc.d/completion.bash @@ -79,7 +79,8 @@ complete -A helptopic \ complete -P '%' -A job \ 'disown' \ 'fg' \ - 'jobs' + 'jobs' \ + 'kill' complete -P '%' -A stopped \ 'bg' -- cgit v1.2.3