Skip to content

Commit

Permalink
Cleanup cli help/abouts.
Browse files Browse the repository at this point in the history
Split long helps/abouts into short and long version to cleanup
suggestions during autocomplete.
  • Loading branch information
schilkp committed Mar 21, 2024
1 parent 687edbe commit e803f58
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cmd/fusesoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::target::TargetSpec;
/// Assemble the `fusesoc` subcommand.
pub fn new() -> Command {
Command::new("fusesoc")
.about("Creates a FuseSoC `.core` file for all dependencies where none is present.")
.about("Creates a FuseSoC `.core` file for all dependencies where none is present")
.arg(
Arg::new("single")
.long("single")
Expand Down
3 changes: 2 additions & 1 deletion src/cmd/packages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ pub fn new() -> Command {
.long("flat")
.num_args(0)
.action(ArgAction::SetTrue)
.help("Do not group packages by topological rank. If the `--graph` option is specified, print multiple lines per package, one for each dependency.")
.help("Do not group packages by topological rank")
.long_help("Do not group packages by topological rank. If the `--graph` option is specified, print multiple lines per package, one for each dependency.")
)
}

Expand Down
9 changes: 6 additions & 3 deletions src/cmd/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ pub struct PatchLink {
pub fn new() -> Command {
Command::new("vendor")
.subcommand_required(true).arg_required_else_help(true)
.about("Copy source code from upstream external repositories into this repository. Functions similar to the lowrisc vendor.py script. Type bender vendor <SUBCOMMAND> --help for more information about the subcommands.")
.about("Copy source code from upstream external repositories into this repository")
.long_about("Copy source code from upstream external repositories into this repository. Functions similar to the lowrisc vendor.py script. Type bender vendor <SUBCOMMAND> --help for more information about the subcommands.")
.subcommand(Command::new("diff")
.about("Display a diff of the local tree and the upstream tree with patches applied.")
.arg(
Expand All @@ -46,7 +47,8 @@ pub fn new() -> Command {
)
)
.subcommand(Command::new("init")
.about("(Re-)initialize the external dependencies. Copies the upstream files into the target directories and applies existing patches.")
.about("(Re-)initialize the external dependencies.")
.long_about("(Re-)initialize the external dependencies. Copies the upstream files into the target directories and applies existing patches.")
.arg(
Arg::new("no_patch")
.short('n')
Expand All @@ -61,7 +63,8 @@ pub fn new() -> Command {
Arg::new("plain")
.action(ArgAction::SetTrue)
.long("plain")
.help("Generate a plain diff instead of a format-patch. Includes all local changes (not only the staged ones)."),
.help("Generate a plain diff instead of a format-patch.")
.long_help("Generate a plain diff instead of a format-patch. Includes all local changes (not only the staged ones)."),
)
.arg(
Arg::new("message")
Expand Down

0 comments on commit e803f58

Please sign in to comment.