Additional performance tweak for __fish_gnu_complete

darcs-hash:20070116125116-ac50b-0a702bc02f9a126b36505864dcc597661a7ca2b0.gz
This commit is contained in:
axel 2007-01-16 22:51:16 +10:00
parent b999bd9c8c
commit 81e0fcbc13

View file

@ -17,18 +17,19 @@ 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
switch $i
case -l --long
set __fish_gnu_complete_skip_next 1
continue
end
@ -36,6 +37,7 @@ function __fish_gnu_complete -d "Wrapper for the complete builtin. Skips the lon
end
set argv $argv_out
end
set -e __fish_gnu_complete_skip_next
complete $argv