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

Show subcommands in help output #18

Merged
merged 34 commits into from Feb 20, 2014
Merged

Show subcommands in help output #18

merged 34 commits into from Feb 20, 2014

Conversation

parkr
Copy link
Member

@parkr parkr commented Feb 20, 2014

screen shot 2014-02-20 at 6 36 52 pm

  • Print custom presentation of command when help switch passed
  • Allow subcommands to use --help and --version to show their respective subcommands
  • Specs for Mercenary::Presenter

Fixes #15.

@parkr parkr added this to the 0.3.0 milestone Feb 20, 2014
@parkr parkr added the Feature label Feb 20, 2014
@parkr parkr assigned mattr- and parkr and unassigned mattr- Feb 20, 2014
@parkr
Copy link
Member Author

parkr commented Feb 20, 2014

@imathis @svnpenn How does this look?

@imathis
Copy link

imathis commented Feb 20, 2014

I think it might be a bit verbose. If I want to see what options a subcommand has I can run command subcommand --help right? In that case I like the look of the output when you run git help where it displays "The most commonly use commands".

screenshot of iterm

A list of subcommands followed by description would also be a way to do this.

@parkr
Copy link
Member Author

parkr commented Feb 20, 2014

If I want to see what options a subcommand has I can run command subcommand --help right?

Not at the moment, which is why I asked.

A list of subcommands followed by description would also be a way to do this.

This sounds sane. :)

@imathis
Copy link

imathis commented Feb 20, 2014

Ah, yes. I'd love to be able to scope --help to a subcommand if possible.

@parkr
Copy link
Member Author

parkr commented Feb 20, 2014

Scoped -h and -v as well! Now we have something like:

screen shot 2014-02-20 at 12 29 42 pm

@ghost
Copy link

ghost commented Feb 20, 2014

Aren't we reinventing the wheel here? Can't we just make it look like it was before mercenary?

@parkr
Copy link
Member Author

parkr commented Feb 20, 2014

@svnpenn This entire program is reinventing the wheel. Just better. More circular, more perfect.

Take a look at the travis output for examples.

@ghost
Copy link

ghost commented Feb 20, 2014

Take a look at the travis output for examples.

I dont know how to do that.

@imathis
Copy link

imathis commented Feb 20, 2014

@parkr I dig it. However I'd prefer left alignment of subcommands and appropriate padding for descriptions, much like the git help demo above. Right alignment looks nice, but hinders readability.

@parkr
Copy link
Member Author

parkr commented Feb 20, 2014

@imathis New screenshot in the main description above. Thinking we should center options around the , instead of just rjust-ing them. Thoughts?

Take a look at the travis output for examples.

I dont know how to do that.

Check this out: https://travis-ci.org/jekyll/mercenary/jobs/19274463

@imathis
Copy link

imathis commented Feb 20, 2014

@parkr Yeah, I'd agree with left justifying options and padding them to center on the , if that's possible.

@ghost
Copy link

ghost commented Feb 20, 2014

Jekyll subcommands are for example watch build. I do not see those on the travis page. So I do not see how viewing that page is helpful.

@parkr
Copy link
Member Author

parkr commented Feb 20, 2014

I do not see those on the travis page. So I do not see how viewing that page is helpful.

It doesn't contain the Jekyll output – I meant that you can see example output for the commands in the examples.

parkr added a commit that referenced this pull request Feb 20, 2014
@parkr parkr merged commit 574d038 into master Feb 20, 2014
parkr added a commit that referenced this pull request Feb 20, 2014
@parkr parkr deleted the show-subcommands branch February 20, 2014 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sub-Commands of a Command or Program Not Displayed in Help Message
3 participants