mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Remove the final non-builtin call from __fish_gnu_complete, to make it even faster
darcs-hash:20070118162853-ac50b-a31f51d53ba3121eaf6dfb4006dde00491fd53c2.gz
This commit is contained in:
parent
421aff7d67
commit
029be823e2
1 changed files with 22 additions and 15 deletions
|
@ -17,27 +17,34 @@ function __fish_gnu_complete -d "Wrapper for the complete builtin. Skips the lon
|
||||||
|
|
||||||
set argv $argv_out
|
set argv $argv_out
|
||||||
set argv_out
|
set argv_out
|
||||||
|
set -l skip_next 0
|
||||||
|
|
||||||
# Remove long option if not on a gnu system
|
# Remove long option if not on a gnu system
|
||||||
if test $is_gnu = 0
|
switch $is_gnu
|
||||||
for i in $argv
|
case 0
|
||||||
|
for i in $argv
|
||||||
|
|
||||||
if set -q __fish_gnu_complete_skip_next
|
switch $skip_next
|
||||||
set -e __fish_gnu_complete_skip_next
|
|
||||||
continue
|
case 1
|
||||||
end
|
set skip_next 0
|
||||||
|
continue
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
switch $i
|
switch $i
|
||||||
case -l --long
|
|
||||||
set __fish_gnu_complete_skip_next 1
|
case -l --long
|
||||||
continue
|
set skip_next 1
|
||||||
end
|
continue
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
set argv_out $argv_out $i
|
||||||
|
end
|
||||||
|
set argv $argv_out
|
||||||
|
|
||||||
set argv_out $argv_out $i
|
|
||||||
end
|
|
||||||
set argv $argv_out
|
|
||||||
end
|
end
|
||||||
set -e __fish_gnu_complete_skip_next
|
|
||||||
|
|
||||||
complete $argv
|
complete $argv
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue