Skip to content

Commit

Permalink
add aliases to make revision sub-commands more accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Aug 4, 2022
1 parent 2f506c7 commit a6d79e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plumbing/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,13 @@ pub mod commit {

pub mod revision {
#[derive(Debug, clap::Subcommand)]
#[clap(visible_alias = "rev")]
#[clap(visible_alias = "rev", visible_alias = "r")]
pub enum Subcommands {
/// Provide the revision specification like `@~1` to explain.
#[clap(visible_alias = "e")]
Explain { spec: std::ffi::OsString },
/// Try to resolve the given revspec and print the object names.
#[clap(visible_alias = "query", visible_alias = "parse")]
#[clap(visible_alias = "query", visible_alias = "parse", visible_alias = "p")]
Resolve {
/// Instead of resolving a rev-spec, explain what would be done for the first spec.
///
Expand All @@ -200,6 +201,7 @@ pub mod revision {
specs: Vec<std::ffi::OsString>,
},
/// Return the names and hashes of all previously checked-out branches.
#[clap(visible_alias = "prev")]
PreviousBranches,
}
}
Expand Down

0 comments on commit a6d79e3

Please sign in to comment.