mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 21:21:15 -03:00
Additional performance tweak for __fish_gnu_complete
darcs-hash:20070116125116-ac50b-0a702bc02f9a126b36505864dcc597661a7ca2b0.gz
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user