-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support optional (non-required) positional arguments #5
Comments
I'll take this one sometime this week. |
I would suggest |
Hmmm, i like that idea. That would make it very easy to tell what's optional and what's not. |
it will be good if we can provide default value |
I would suggest following traditional shell syntax for brackets: [optional] |
Yeah, agree that sticking with traditional shell syntax is better – going to go with [optional] instead of (optional?) 👍 |
Maybe like this: Still thinking about this... named flags don't have support for a default value yet either. If we add it here, we should add to named flags as well. |
Could also do traditional shell syntax for mandatory args: |
Yeah, I originally had that but then changed it in #16 because a few markdown renderers I noticed were interpreting I might have to take another look at that and see which renderers (like GitHub, or VS Code markdown preview) break... can't remember off the top of my head. |
These both make sense. Just make sure to only set default values for optional args not required ones! |
Required arguments use the round brackets like
(required_arg)
so optional args can probably use square brackets[optional_arg]
.The text was updated successfully, but these errors were encountered: