pcapriotti / pcapriotti/optparse-applicative

Conflict between `subparserInline` and `forwardOptions`

Open
#524 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I have a use case where one subcommand should forward to an external CLI tool, while other subcommands are internal to the program. I want the behaviour of subparserInline, but adding that to customExecParser seems to break the local forwardOptions for that forwarding subcommand. Specifically, the forwarding command reports unknown options even though it has forwardOptions specified.

Is there any workaround for this? (Or even better, can something be done upstream here?)

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.

Research direction

The issue names the customExecParser, subparserInline, and forwardOptions entry points but no files or tests. Start by reproducing a parser with one external forwarding subcommand and other internal subcommands, then trace how the inline subparser handles unknown options. Done means the forwarding command accepts its external options while internal subcommands retain their existing parsing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.