mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 18:03:37 +08:00
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.
This commit is contained in:
parent
c077aae022
commit
4bcd0413f8
|
@ -2,8 +2,7 @@
|
|||
__fish_complete_pgrep pkill
|
||||
__fish_make_completion_signals
|
||||
for i in $__kill_signals
|
||||
set number (echo $i | cut -d " " -f 1)
|
||||
set name (echo $i | cut -d " " -f 2)
|
||||
echo $i | read number name
|
||||
complete -c pkill -o $number -d $name
|
||||
complete -c pkill -o $name -d $name
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user