Skip to content

Fix noIntersperse behaviour, and add a new policy - #234

Merged
HuwCampbell merged 3 commits into
masterfrom
topic/no-intersperse
Mar 8, 2017
Merged

HuwCampbell merged 3 commits into
masterfrom
topic/no-intersperse

Conversation

@HuwCampbell

@HuwCampbell HuwCampbell commented Oct 24, 2016 •

Copy link
Copy Markdown
Collaborator

noInterperse was not allowing any options to occur
before arguments, and wasn't behaving as its namesake
in other parsing libraries.

Add a new policy (which is potentially useful for
applications wrapping other cli tools) allowing the
command (or subcommand) to collect all unknown options
and arguments as positionals to be passed to the
command line.

@samtay

samtay commented Dec 14, 2016

Copy link
Copy Markdown

Any idea when this well get merged? I too have built a CLI tool that forwards to another, and would love to save those characters / allow intuitive use. Right now noIntersperse breaks my executable..

@HuwCampbell

Copy link
Copy Markdown
Collaborator Author

Plan is to get a point release out for documentation and version bounds before Christmas; then the 0.14 release with this (after I have figured out how to fix the lingering issue mentioned in #233) and #223.
So probably Jan.

@samtay

samtay commented Dec 15, 2016

Copy link
Copy Markdown

Awesome, looking forward to it. Also thanks in general for your work, this package is wonderful.

Comment thread Options/Applicative/Types.hs Outdated
| NoInterspersePolicy
-- ^ Options must all come before arguments, once a
-- single option is parsed, all remaining arguments
-- are treated as positionals.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/once a single option is parsed/once a single argument is parsed/ ? (unless I misunderstand the behaviour)

@jacobstanley

Copy link
Copy Markdown

👍

@erikd

erikd commented Jan 13, 2017

Copy link
Copy Markdown

This looks useful! 👍

noInterpserse was not allowing any options to occur
before arguments, and wasn't behaving as its namesake
in other parsing libraries.

Add a new policy (which is potentially useful for
applications wrapping other cli tools) allowing the
command (or subcommand) to collect all unknown options
and arguments as positionals to be passed to the
command line.
@HuwCampbell
HuwCampbell force-pushed the topic/no-intersperse branch 2 times, most recently from dcdc673 to 37a4ee1 Compare February 26, 2017 07:32
@HuwCampbell
HuwCampbell merged commit 5774bad into master Mar 8, 2017
@HuwCampbell
HuwCampbell deleted the topic/no-intersperse branch March 8, 2017 08:28
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

Successfully merging this pull request may close these issues.

4 participants