Closed libre-man closed 7 years ago
Thanks, this is a good feature to have!
I've just enabled Travis CI for this repo, could you please rebase against current master?
Also, could you try to avoid changing indentation unless you really change indented code, it would make reviewing a lot easier.
Applied as 5d59869fe965951e804fab821ede5fb0b084331f.
Oh sorry I forgot about your comments. Sorry for the indentation, my Emacs autoindents my code as I type.
My Emacs does that too, the trick is to evaluate the macro first so indentation code in slime becomes aware of it. Then it indents it correctly.
By the way isn't it a better idea to also give the correct arguments to the error so that a possible handler can do something different if arguments like --help
are passed?
--help
is not an argument, it's a flag (option). If you mean that the library should handle cases like --required-option --help
and figure out that --help
is not value of option but a separate flag, I'd say it's too hairy a design.
No what I mean is that a program might have a required option but also a help flag. You probably don't want to show an error to the user if the help flag is passed even if the required argument is not given. At the moment the required error does not specify the arguments and flags that are given, so it is not possible to check if a flag like help is passed during the handling of the error.
Yeah, that could be improved.
A lot of my programs have required flags such as usernames. For these programs it is useful to mark options as required.