-
Notifications
You must be signed in to change notification settings - Fork 14
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
Can't pass in an empty string to an option #20
Comments
I have been thinking about this for a while now. I agree we need a way to override a default string option to a given empty string... but it is non-trivial. I say that because of the following: 1- there is a need to establish what we want -- studying the behaviour of other classic CLI (C/Python) would be the next step (see below)
For all the "should do" with "OR" cases, we would need to look at how it is done typically and if it makes sense. |
Some links for reference The primary Python framework Click The nim stdlib parseopt seems to be very reminiscent of getopt which has always been fairly restrictive (POSIX only requires single letter flags/options, so the tooling for that has been similarly limited), so probably opting for a custom parsing library would give the best sanest result Also worth noting that the argument passing mechanisms differ between OSes. (e.g. windows doesn't really have an understanding of what quoting is) so that is a potential issue |
There should only be an error if the user hasn't explicitly given a blank value, like the following
executable --var # out: Missing value for option 'var'
The text was updated successfully, but these errors were encountered: