Commit graph

9 commits

Author SHA1 Message Date
Sean Stangl 4c66d18361 fix panic if an alias is defined to "" 2021-12-12 13:30:31 -07:00
Sean Stangl 6df4b1ef71 Update behavior to pass-through simple aliases
This changes the behavior so that simple aliases that directly alias a
subcommand (with no arguments) pass-through to that subcommand, while
complex aliases (with arguments) show the alias.

So for example, `cargo help b` will show the manpage for `cargo-build`,
while `cargo help my-alias`, aliased to `build --release`, will show
"`my-alias` is aliased to `build --release`".
2021-12-12 10:18:19 -07:00
Sean Stangl e77b254923 Update help::help_alias() to assert the new behavior 2021-12-11 15:31:48 -07:00
l00556901 128ed4c964 add test 2021-09-22 11:36:08 +08:00
bors 05d37ae2c0 Fix #9350 (cargo build -Z help is missing options)
> Do not merge yet, some options are still undocumented.

Fix #9350 (cargo build -Z help is missing options)

Add a procedural macro to declare `CliUnstable` struct and provide help messages instead of hard-coding help in `src/bin/cargo/cli.rs`

> Flags documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html

Feedback welcome
2021-04-20 21:58:22 +00:00
Eric Huss bcfdf9fbad New namespaced features implementation. 2020-10-23 16:04:41 -07:00
Eric Huss 6f8c7d5a87 Normalize raw string indentation. 2020-09-26 17:59:58 -07:00
Eric Huss 0e26eae5c1 Display embedded man pages for built-in commands. 2020-08-03 12:30:38 -07:00
Eric Huss 9138d65e4c Create a dedicated module for help tests. 2020-08-03 12:17:58 -07:00