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

Function getShortDescription

packages/cli/src/internal/options.ts:2053–2073  ·  view source on GitHub ↗
(self: Instruction)

Source from the content-addressed store, hash-verified

2051 .replaceAll(")", "\\)")
2052
2053const getShortDescription = (self: Instruction): string => {
2054 switch (self._tag) {
2055 case "Empty":
2056 case "Both":
2057 case "OrElse": {
2058 return ""
2059 }
2060 case "Single": {
2061 return InternalSpan.getText(InternalHelpDoc.getSpan(self.description))
2062 }
2063 case "KeyValueMap":
2064 case "Variadic": {
2065 return getShortDescription(self.argumentOption as Instruction)
2066 }
2067 case "Map":
2068 case "WithDefault":
2069 case "WithFallback": {
2070 return getShortDescription(self.options as Instruction)
2071 }
2072 }
2073}
2074
2075/** @internal */
2076export const getBashCompletions = (self: Instruction): ReadonlyArray<string> => {

Callers 2

getFishCompletionsFunction · 0.70
getZshCompletionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected