[READ-ONLY] Mirror of https://github.com/bombshell-dev/tab. shell autocompletions for javascript CLIs
4

Configure Feed

Select the types of activity you want to include in your feed.

fix: citty availableFlags issue

AmirSa12 (Dec 25, 2024, 3:03 PM +0330) 3f0ac3bb 6885e583

+4 -1
+4 -1
citty.ts
··· 96 96 if (toComplete.startsWith("--")) { 97 97 if (toComplete === "--") { 98 98 const allFlags = [...flagMap.keys()]; 99 + const specifiedFlags = previousArgs.filter(arg => arg.startsWith('--')); 100 + const availableFlags = allFlags.filter(flag => !specifiedFlags.includes(flag)); 101 + 99 102 completions.push( 100 - ...allFlags.map( 103 + ...availableFlags.map( 101 104 (flag) => 102 105 `${flag}\t${matchedCommand.args[flag.slice(2)]?.description ?? "Option"}` 103 106 )