Skip to content
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 not easily specify errMsg when using 'some' #119

Closed
doubleloop opened this issue Dec 8, 2014 · 2 comments
Closed

Can not easily specify errMsg when using 'some' #119

doubleloop opened this issue Dec 8, 2014 · 2 comments

Comments

@doubleloop
Copy link

In the very simple sample:

data Sample = Sample { inputFiles :: [FilePath] } deriving Show

sample = Sample <$> some (strArgument (metavar "FILES..."))

main = execParser (info sample fullDesc) >>= print

it would be grate to easily specify error msg for 'some' to get msg like:

$ ./sample
sample: no input files
Usage: sample FILES...

instead of

$ ./sample
Usage: sample FILES...
@doubleloop doubleloop changed the title Can not easily specify errMsg Can not easily specify errMsg when using 'some' Dec 8, 2014
@HuwCampbell
Copy link
Collaborator

Pull #139 add descriptions for what is missing when parsing. You're case becomes:
Missing: FILES...
Usage: sample FILES...

@HuwCampbell
Copy link
Collaborator

I'm satisfied that this is fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants