blob: 0aca041fc3a686c87d12c1591c8cd031d028d3c3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# Complete kill builtin with jobspecs (prefixed with % so it will accept them)
# and this user's PIDs (requires pgrep(1))
_kill() {
while read -r pid ; do
case $pid in
"${COMP_WORDS[COMP_CWORD]}"*)
COMPREPLY[${#COMPREPLY[@]}]=$pid
;;
esac
done < <( {
compgen -A job -P%
pgrep -u "$USER" .
} 2>/dev/null )
}
complete -F _kill kill
|