Duplicate option displays wrong error message...

Open
#395 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
haskell
Domain
cli

Research direction

Start by reproducing the parser behavior with a duplicated --request option, then trace the duplicate-option error handling in the optparse-applicative codebase. Done means the parser reports that the option is duplicated rather than invalid, with tests covering the message.

Written by the indexing model from the issue text.

Description

suggestion

I have a parser accepting --request option, and when user accidentally uses it twice, the error message says:

Invalid option `--request'

It should probably report:

Duplicated option is not allowed `--request'

Otherwise user things that the option name is wrong.

Dominant language
Haskell
Stars
959
Forks
123
Avg merge
3d 19h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pcapriotti/optparse-applicative

All issues in pcapriotti/optparse-applicative

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.