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

Issues 521,522 #525

Merged
merged 3 commits into from
Jun 10, 2016
Merged

Issues 521,522 #525

merged 3 commits into from
Jun 10, 2016

Conversation

kbknapp
Copy link
Member

@kbknapp kbknapp commented Jun 10, 2016

No description provided.

…iased subcommand

Imagine subcommand `foo` had alias `bar`, running `myprog help bar` now correctly displays the help
for `foo`

Closes #521
This commit adds support for visible aliases, which function exactly like aliases except that they
also appear in the help message, using the help string of the aliased subcommand.

i.e.

```rust
App::new("myprog")
    .subcommand(SubCommand::with_name("test")
		.about("does testy things")
		.alias("invisible")
		.visible_alias("visible"));
```

When run with `myprog --help`, the output is:

```
myprog

USAGE:
	myprog [FLAGS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    help	        Prints this message or the help of the given subcommand(s)
    test|visible    does testy things
```

Closes #522
@yo-bot
Copy link

yo-bot commented Jun 10, 2016

r? @sru

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

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 85.532% when pulling 2ff981b on issues-521,522 into e1d33f8 on master.

@kbknapp
Copy link
Member Author

kbknapp commented Jun 10, 2016

@homu r+

@homu
Copy link
Contributor

homu commented Jun 10, 2016

📌 Commit 2ff981b has been approved by kbknapp

homu added a commit that referenced this pull request Jun 10, 2016
homu added a commit that referenced this pull request Jun 10, 2016
@homu
Copy link
Contributor

homu commented Jun 10, 2016

⌛ Testing commit 2ff981b with merge 50ca205...

@homu
Copy link
Contributor

homu commented Jun 10, 2016

☀️ Test successful - status

@homu homu merged commit 2ff981b into master Jun 10, 2016
@kbknapp kbknapp deleted the issues-521,522 branch June 14, 2016 20:13
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.

None yet

5 participants