fix autoc single letter flags

This commit is contained in:
Olivier Gagnon 2021-10-27 19:21:28 -04:00
parent f92db3b8f8
commit 6835cbaa26
3 changed files with 6 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -322,7 +322,10 @@ export async function determineAllPossibilitiesForTabCompletion(
scripts: currServ.scripts.map((script) => script.filename), scripts: currServ.scripts.map((script) => script.filename),
txts: currServ.textFiles.map((txt) => txt.fn), txts: currServ.textFiles.map((txt) => txt.fn),
flags: (schema: any) => { flags: (schema: any) => {
pos2 = schema.map((f: any) => "--" + f[0]); pos2 = schema.map((f: any) => {
if (f[0].length === 1) return "-" + f[0];
return "--" + f[0];
});
try { try {
return flagFunc(schema); return flagFunc(schema);
} catch (err) { } catch (err) {