fish-shell/share/completions/pkill.fish
Aleksey Filippov 4bcd0413f8 do not execute external command in pkill completions (#4586)
Running "cut" multiple times in a loop has an adverse performance
impact on first use, especially on slow systems. Using builtin "read"
for the same purpose is faster and cleaner.
2017-12-10 21:56:29 -08:00

8 lines
202 B
Fish

__fish_complete_pgrep pkill
__fish_make_completion_signals
for i in $__kill_signals
echo $i | read number name
complete -c pkill -o $number -d $name
complete -c pkill -o $name -d $name
end