blob: 9aeb0ba8b65f8ddcbdda26a5de85c8b8afd3f492 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
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
|