Skip to content

Commit b97708d

Browse files
committed
fix: allow to use .* to denote dot-nested option
1 parent 96acbc7 commit b97708d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Option.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export default class Option {
2323
) {
2424
this.config = Object.assign({}, config)
2525

26+
// You may use cli.option('--env.* [value]', 'desc') to denote a dot-nested option
27+
rawName = rawName.replace(/\.\*/, '')
28+
2629
this.negated = false
2730
this.names = removeBrackets(rawName)
2831
.split(',')

0 commit comments

Comments
 (0)