We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6885e58 commit 3f0ac3bCopy full SHA for 3f0ac3b
citty.ts
@@ -96,8 +96,11 @@ export default function tab(mainCommand) {
96
if (toComplete.startsWith("--")) {
97
if (toComplete === "--") {
98
const allFlags = [...flagMap.keys()];
99
+ const specifiedFlags = previousArgs.filter(arg => arg.startsWith('--'));
100
+ const availableFlags = allFlags.filter(flag => !specifiedFlags.includes(flag));
101
+
102
completions.push(
- ...allFlags.map(
103
+ ...availableFlags.map(
104
(flag) =>
105
`${flag}\t${matchedCommand.args[flag.slice(2)]?.description ?? "Option"}`
106
)
0 commit comments