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,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