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

Request to support for -- parameter separator. #374

Closed
lygstate opened this issue Mar 19, 2015 · 4 comments
Closed

Request to support for -- parameter separator. #374

lygstate opened this issue Mar 19, 2015 · 4 comments

Comments

@lygstate
Copy link

No description provided.

@SomeKittens
Copy link
Collaborator

Can you provide some examples, as well as why this works better for you than other current solutions?

@SomeKittens
Copy link
Collaborator

Closing, will reopen if examples provided.

@ejfrancis
Copy link

ejfrancis commented May 19, 2016

if @lygstate was talking about the ability to add a separator between options, I've done that in my fork in the feature/option-separator branch ejfrancis@1adcfce

So you can do

  program
    .optionSeparator('Section A')
    .option('-a, --aopt', ' aopt desc')
    .option('-b, --bopt', ' bopt desc')
    .optionSeparator('Section B')
    .option('-c, --copt', ' copt desc')
    .option('-d, --dopt', ' dopt desc')

and its output looks like this

image

@tj @SomeKittens is this something you're interested it getting into the repo? if so I could clean it up, test it and put up a PR

@bimlas
Copy link

bimlas commented Mar 23, 2019

I think @lygstate thought the way the Git works. For example:

git log [<options>] [<revision range>] [[--] <path>…​]

Thus, it would be possible to use multiple variadic arguments.

mystuff <command> [tags...] -- [paths...]

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

4 participants