currently if i use camel-cased arguments in options, brocli would keep it as-is:
const foo = command({
name: 'foo',
options: {
fooBar: string()
},
handler: console.log
})
would result in something along
$ node test.js foo -h
Usage:
foo [flags]
Flags:
--fooBar string
$ node test.js foo --foo-bar 123
Unrecognized options for command 'foo': --foo-bar
and while that's mostly personal preference, i think that camel-cased arguments are ugly and prefer them being in kebab-case. and currently the only way to achieve that is manually putting kebab-cased version everywhere (either as a key or a display name)
i propose some way for library users to achieve that more cleanly, probably by exposing some kind of delegate in the run() config, something like
run([...], {
transformName: {
fromCli: kebabToCamel,
toCli: camelToKebab
}
})
currently if i use camel-cased arguments in
options, brocli would keep it as-is:would result in something along
$ node test.js foo -h Usage: foo [flags] Flags: --fooBar string $ node test.js foo --foo-bar 123 Unrecognized options for command 'foo': --foo-barand while that's mostly personal preference, i think that camel-cased arguments are ugly and prefer them being in
kebab-case. and currently the only way to achieve that is manually putting kebab-cased version everywhere (either as a key or a display name)i propose some way for library users to achieve that more cleanly, probably by exposing some kind of delegate in the
run()config, something like