@@ -18,9 +18,9 @@ extension [ParsableCommand.Type] {
18
18
let commandName = first!. _commandName
19
19
return """
20
20
function \( shouldOfferCompletionsForFunctionName) -a expected_commands -a expected_positional_index
21
- set -f unparsed_tokens ( \( tokensFunctionName) -pc)
22
- set -f positional_index 0
23
- set -f commands
21
+ set -l unparsed_tokens ( \( tokensFunctionName) -pc)
22
+ set -l positional_index 0
23
+ set -l commands
24
24
25
25
switch $unparsed_tokens[1]
26
26
\( commandCases)
@@ -30,7 +30,7 @@ extension [ParsableCommand.Type] {
30
30
end
31
31
32
32
function \( tokensFunctionName)
33
- if test " $ (string split -m 1 -f 1 -- . " $FISH_VERSION " ) " -gt 3
33
+ if test (string split -m 1 -f 1 -- . " $FISH_VERSION " ) -gt 3
34
34
commandline --tokens-raw $argv
35
35
else
36
36
commandline -o $argv
@@ -39,8 +39,8 @@ extension [ParsableCommand.Type] {
39
39
40
40
function \( parseSubcommandFunctionName) -S
41
41
argparse -s r -- $argv
42
- set -f positional_count $argv[1]
43
- set -f option_specs $argv[2..]
42
+ set -l positional_count $argv[1]
43
+ set -l option_specs $argv[2..]
44
44
45
45
set -a commands $unparsed_tokens[1]
46
46
set -e unparsed_tokens[1]
@@ -59,20 +59,20 @@ extension [ParsableCommand.Type] {
59
59
end
60
60
61
61
function \( completeDirectoriesFunctionName)
62
- set -f token (commandline -t)
62
+ set -l token (commandline -t)
63
63
string match -- '*/' $token
64
- set -f subdirs $token*/
64
+ set -l subdirs $token*/
65
65
printf '%s \\ n' $subdirs
66
66
end
67
67
68
68
function \( customCompletionFunctionName)
69
69
set -x \( CompletionShell . shellEnvironmentVariableName) fish
70
70
set -x \( CompletionShell . shellVersionEnvironmentVariableName) $FISH_VERSION
71
71
72
- set -f tokens ( \( tokensFunctionName) -p)
73
- if test -z " $ (\( tokensFunctionName) -t) "
74
- set -f index (count ( \( tokensFunctionName) -pc))
75
- set -f tokens $tokens[..$index] \\ ' \\ ' $tokens[$ (math $index + 1)..]
72
+ set -l tokens ( \( tokensFunctionName) -p)
73
+ if test -z " ( \( tokensFunctionName) -t) "
74
+ set -l index (count ( \( tokensFunctionName) -pc))
75
+ set tokens $tokens[..$index] \\ ' \\ ' $tokens[(math $index + 1)..]
76
76
end
77
77
command $tokens[1] $argv $tokens
78
78
end
0 commit comments