mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00: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
1 changed files with 1 additions and 2 deletions
|
@ -2,8 +2,7 @@
|
||||||
__fish_complete_pgrep pkill
|
__fish_complete_pgrep pkill
|
||||||
__fish_make_completion_signals
|
__fish_make_completion_signals
|
||||||
for i in $__kill_signals
|
for i in $__kill_signals
|
||||||
set number (echo $i | cut -d " " -f 1)
|
echo $i | read number name
|
||||||
set name (echo $i | cut -d " " -f 2)
|
|
||||||
complete -c pkill -o $number -d $name
|
complete -c pkill -o $number -d $name
|
||||||
complete -c pkill -o $name -d $name
|
complete -c pkill -o $name -d $name
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue