(self: Instruction)
| 2052 | .replaceAll(")", "\\)") |
| 2053 | |
| 2054 | const 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 */ |
| 2077 | export const getBashCompletions = (self: Instruction): ReadonlyArray<string> => { |
no outgoing calls
no test coverage detected