💡
Call init
once to validate the option definitions. After that, you can play
with your options. (Word completion will be available as well.)
Terminal emulation has limited capabilities. Copy, paste, history, colorization, and completion all work, but not as seamlessly as in a real shell. For a smoother experience, you may want to try the demo locally:
npm i -g tsargp && complete -C tsargp tsargp
Things to try out
Names validation
- check if an error is reported for duplicate option names
- check if an error is reported for duplicate cluster letters
- check if an error is reported for duplicate environment variable names
Constraints validation
- check if an error is reported for duplicate parameter choices
- check if an error is reported for an invalid parameter count
- check if an error is reported for an invalid inline constraint
- check if an error is reported for an array-valued option with too many values in the default or example value, when configured with an element count
Requirements validation
- check if an error is reported for an option requiring itself
- check if an error is reported for an option requiring an unknown option
- check if an error is reported for an option requiring a help or version option
- check if an error is reported for an option requiring an option that is always required
Miscellaneous
- check if an error is reported for duplicate positional options
- check if an error is reported for an option that cannot be supplied
Validation warnings
- check if a warning is reported for option names too similar to each other (e.g.
-help1
and-help2
) - check if a warning is reported for option names with mixed naming conventions (e.g.
-h
and--b
) - check if a warning is reported for a variadic option with cluster letters
Last updated on