mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Additional performance tweak for __fish_gnu_complete
darcs-hash:20070116125116-ac50b-0a702bc02f9a126b36505864dcc597661a7ca2b0.gz
This commit is contained in:
parent
b999bd9c8c
commit
81e0fcbc13
1 changed files with 7 additions and 5 deletions
|
@ -17,25 +17,27 @@ function __fish_gnu_complete -d "Wrapper for the complete builtin. Skips the lon
|
|||
|
||||
set argv $argv_out
|
||||
set argv_out
|
||||
set -l skip_next 0
|
||||
|
||||
# Remove long option if not on a gnu system
|
||||
if test $is_gnu = 0
|
||||
for i in $argv
|
||||
|
||||
if test $skip_next = 1
|
||||
if set -q __fish_gnu_complete_skip_next
|
||||
set -e __fish_gnu_complete_skip_next
|
||||
continue
|
||||
end
|
||||
|
||||
if test $i = -l
|
||||
set skip_next 1
|
||||
continue
|
||||
switch $i
|
||||
case -l --long
|
||||
set __fish_gnu_complete_skip_next 1
|
||||
continue
|
||||
end
|
||||
|
||||
set argv_out $argv_out $i
|
||||
end
|
||||
set argv $argv_out
|
||||
end
|
||||
set -e __fish_gnu_complete_skip_next
|
||||
|
||||
complete $argv
|
||||
|
||||
|
|
Loading…
Reference in a new issue