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

Issue 416 - Help subcommand accepts other subcommands as arguments #450

Merged
merged 3 commits into from
Mar 15, 2016

Conversation

kbknapp
Copy link
Member

@kbknapp kbknapp commented Mar 15, 2016

Merge after #449

Closes #416

… help subcommand

The `help` subcommand can now accept other subcommands as arguments to
display their help message. This is similar to how many other CLIs
already perform. For example:

```
$ myprog help mysubcmd
```

Would print the help message for `mysubcmd`. But even more, the `help`
subcommand accepts nested subcommands as well, i.e. a grandchild
subcommand such as

```
$ myprog help child grandchild
```

Would print the help message of `grandchild` where `grandchild` is a
subcommand of `child` and `child` is a subcommand of `myprog`.

Closes #416
@yo-bot
Copy link

yo-bot commented Mar 15, 2016

r? @Vinatorul

(yo-bot has picked a reviewer for you, use r? to override)

@kbknapp
Copy link
Member Author

kbknapp commented Mar 15, 2016

@homu r+

@homu
Copy link
Contributor

homu commented Mar 15, 2016

📌 Commit babfd26 has been approved by kbknapp

homu added a commit that referenced this pull request Mar 15, 2016
Issue 416 - Help subcommand accepts other subcommands as arguments

Merge *after* #449

Closes #416
@homu
Copy link
Contributor

homu commented Mar 15, 2016

⌛ Testing commit babfd26 with merge cc127f9...

homu added a commit that referenced this pull request Mar 15, 2016
Issue 416 - Help subcommand accepts other subcommands as arguments

Merge *after* #449

Closes #416
@homu
Copy link
Contributor

homu commented Mar 15, 2016

☀️ Test successful - status

@homu homu merged commit babfd26 into master Mar 15, 2016
@crumblingstatue
Copy link

Thank you! I ❤️ love ❤️ this feature!

One tiny complaint is that the help message looks a bit awkward.

Shouldn't help messages aim to fit nicely in 80 columns without wrapping?

@sru
Copy link
Contributor

sru commented Mar 15, 2016

@crumblingstatue It should wrap nicely at term width (which is not necessarily 80) unless running it in Windows. However, I also think it should be shorter.

how about:

    help    prints this message or help message of given subcommand

@kbknapp
Copy link
Member Author

kbknapp commented Mar 16, 2016

@sru yeah we can shorten it to that wording and I'm fine with that since I think it's a little long too.

@crumblingstatue if you're not disabling the default cargo features or running Windows it should wrap at the term width...although I think adding a setting to wrap at a specified width regardless would be great too. I'll add a new issue to track that once I get home if someone hasn't already done it.

@crumblingstatue
Copy link

@kbknapp I opened #452 and #453 about this.

@kbknapp kbknapp deleted the issue-416 branch March 21, 2016 22:59
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.

6 participants