MCPcopy
hub / github.com/Effect-TS/effect / rootCompletions

Function rootCompletions

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 3

pipeFunction · 0.70
mapMethod · 0.65
joinMethod · 0.65

Tested by

no test coverage detected