You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have my own fork of this project for a cli I'm putting together.
In my fork I currently have a few new features. They are:
Variadic arguments. Pretty self explanatory... I added argument parsing for variadic arguments using the syntax "command [VARIADIC...]" where the word VARIADIC can be replaced by any string, of course. An array of values are then passed to an action callback in the 2nd to last position, right before the options/self/this reference.
A bootstrap function. This is basically a callback you can optionally add to any instance of command that will run before any sub command's action callback. The purpose of this feature was to have access to parsed args and be able to perform logic with them before the program proceeds further downstream to eventual .action() callbacks. In my case, I used this to create a bottleneck where I can configure my logger before any of the actions for my CLI are performed.
and soon I'll be
slightly altering automatically generated help output to do string padding because i've found misaligned help output at times
If anyone believes it's worth actually putting together pull requests for any of these features please let me know and I will do so as soon as I've got the time.
Cheers
The text was updated successfully, but these errors were encountered:
I have my own fork of this project for a cli I'm putting together.
In my fork I currently have a few new features. They are:
Variadic arguments. Pretty self explanatory... I added argument parsing for variadic arguments using the syntax "command [VARIADIC...]" where the word VARIADIC can be replaced by any string, of course. An array of values are then passed to an action callback in the 2nd to last position, right before the options/self/this reference.
A bootstrap function. This is basically a callback you can optionally add to any instance of command that will run before any sub command's action callback. The purpose of this feature was to have access to parsed args and be able to perform logic with them before the program proceeds further downstream to eventual .action() callbacks. In my case, I used this to create a bottleneck where I can configure my logger before any of the actions for my CLI are performed.
and soon I'll be
If anyone believes it's worth actually putting together pull requests for any of these features please let me know and I will do so as soon as I've got the time.
Cheers
The text was updated successfully, but these errors were encountered: