mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
73a9c8bcb8
darcs-hash:20060208092005-ac50b-8e784f79a4e158c8c15b553fad85002dccc7bd03.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
|
|
|