Parsers that consume multiple arguments

Open
#284 12 comments 0 reactions 0 assignees View on GitHub

@roberth is already working on this.

Since Nov 13, 2025.

  • #510 by @roberth — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
haskell
Domain
cli

Research direction

No source file, test, or entry point is named. Start by locating the option-argument parser API and its existing handling of repeated or multiple arguments, then compare it with the example. Done means the command-line input produces the requested list of pairs and has coverage for repeated options.

Written by the indexing model from the issue text.

Description

Is there a way to write a parser for an option that takes multiple command-line arguments?

For example, if I wanted the command-line args

-p one two -p three four

to be parsed into a result like

[("one", "two"), ("three", "four")]
Dominant language
Haskell
Stars
957
Forks
124
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.