You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build-string""$subcommand.name# sub command if present
102
-
}) $quote" [\n" (
103
-
$fishes
104
-
|if ('n'in ($in|columns)) {
105
-
if ($subcommand.name!="") {
106
-
where ($it.n|str contains$subcommand.name) # for subcommand -> any where n matches `__fish_seen_subcommand_from arg` for the subcommand name
107
-
} else {
108
-
where ($it.n=="__fish_use_subcommand") and ($it.a=="") # for root command -> any where n == __fish_use_subcommand and a is empty. otherwise a means a subcommand
109
-
}
110
-
} else {
111
-
$fishes# catch all
112
-
}
113
-
|build-flags
114
-
|str join"\n"
115
-
) "\n\t...args\n]"
98
+
[
99
+
# (sub)command description
100
+
(if ('d'in ($subcommand.args|columns)) and ($subcommand.args.d!="") { $"# ($subcommand.args.d.0)\n" })
where ($it.n|str contains$subcommand.name) # for subcommand -> any where n matches `__fish_seen_subcommand_from arg` for the subcommand name
115
+
} else {
116
+
where ($it.n=="__fish_use_subcommand") and ($it.a=="") # for root command -> any where n == __fish_use_subcommand and a is empty. otherwise a means a subcommand
117
+
}
118
+
} else {
119
+
$fishes# catch all
120
+
}
121
+
|build-flags
122
+
|str join"\n"
123
+
)
124
+
"\n\t...args"
125
+
"\n]"
126
+
]
127
+
|str join
116
128
}
117
129
}
118
130
119
131
# build the list of flag string in nu syntax
132
+
# record<c, n, a, d, o> -> list<string>
120
133
defbuild-flags [] {
121
-
each { |subargs|
134
+
$in
135
+
|each { |subargs|
122
136
if ('l'in ($subargs|columns)) and ($subargs.l!="") {
123
-
build-string"\t--"$subargs.l (build-string
124
-
(if ('s'in ($subargs|columns)) and ($subargs.s!="") {
125
-
build-string"(-"$subargs.s")"
126
-
}) (if ('d'in ($subargs|columns)) and ($subargs.d!="") {
0 commit comments