mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-30 14:53:11 +00:00
343cafef34
darcs-hash:20060217101339-ac50b-d93d2c620a4b7f75f05ff461a6edbee001da7613.gz
29 lines
515 B
Fish
29 lines
515 B
Fish
function __fish_gnu_complete -d "Wrapper for the complete builtin. Skips the long completions on non-GNU systems"
|
|
set is_gnu 0
|
|
|
|
# Check if we are using a gnu system
|
|
for i in (seq (count $argv))
|
|
switch $argv[$i]
|
|
|
|
case -g --is-gnu
|
|
set -e argv[$i]
|
|
set is_gnu 1
|
|
break
|
|
end
|
|
end
|
|
|
|
# Remove long option if not on a gnu system
|
|
if test $is_gnu = 0
|
|
for i in (seq (count $argv))
|
|
if test $argv[$i] = -l
|
|
set -e argv[$i]
|
|
set -e argv[$i]
|
|
break
|
|
end
|
|
end
|
|
end
|
|
|
|
complete $argv
|
|
|
|
end
|
|
|