MCPcopy Index your code
hub / github.com/Effect-TS/effect / getShortDescription

Function getShortDescription

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

Source from the content-addressed store, hash-verified

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

Callers 2

getFishCompletionsFunction · 0.70
getZshCompletionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected