MCPcopy Create free account
hub / github.com/Effect-TS/effect / rootCompletions

Function rootCompletions

packages/cli/src/internal/commandDescriptor.ts:1165–1183  ·  view source on GitHub ↗
(conditionals: ReadonlyArray<string>)

Source from the content-addressed store, hash-verified

1163 ? InternalArgs.getFishCompletions(info.command.args as InternalArgs.Instruction)
1164 : Arr.empty()
1165 const rootCompletions = (conditionals: ReadonlyArray<string>) =>
1166 pipe(
1167 Arr.map(optionsCompletions, (option) =>
1168 pipe(
1169 baseTemplate,
1170 Arr.appendAll(conditionals),
1171 Arr.append(option),
1172 Arr.join(" ")
1173 )),
1174 Arr.appendAll(
1175 Arr.map(argsCompletions, (option) =>
1176 pipe(
1177 baseTemplate,
1178 Arr.appendAll(conditionals),
1179 Arr.append(option),
1180 Arr.join(" ")
1181 ))
1182 )
1183 )
1184 const subcommandCompletions = (conditionals: ReadonlyArray<string>) =>
1185 Arr.map(info.subcommands, ([name, subcommand]) => {
1186 const description = getShortDescription(subcommand)

Callers 1

Calls 3

pipeFunction · 0.70
mapMethod · 0.65
joinMethod · 0.65

Tested by

no test coverage detected