sindresorhus/meow


The issue has been solved
Remove short-flags in `cli.flags` if they're defined as `alias` #102
sindresorhus posted onGitHub
const cli = m({
argv: ['-c', '-l'],
flags: {
coco: {
alias: 'c'
},
loco: {
alias: 'l'
}
}
});
console.log(cli.flags);
//=> { c: true, coco: true, l: true, loco: true }
Since c
and l
are defined as alias
for two other flags, I think we should just exclude the short-flags from the cli.flags
output. They just create noise there.
So it would be this instead:
console.log(cli.flags);
//=> { coco: true, loco: true }
Thoughts?