Skip to content

Commit

Permalink
cli: print commands in alphabetical order
Browse files Browse the repository at this point in the history
Until clap-rs/clap#1553 is fixed, I don't
think we can do better than alphabetical order (without a lot of
work).
  • Loading branch information
martinvonz committed Mar 7, 2023
1 parent 4984e61 commit e509a29
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions src/commands/mod.rs
Expand Up @@ -64,34 +64,29 @@ use crate::ui::Ui;

#[derive(clap::Parser, Clone, Debug)]
enum Commands {
Version(VersionArgs),
Init(InitArgs),
Abandon(AbandonArgs),
Backout(BackoutArgs),
#[command(subcommand)]
Config(ConfigSubcommand),
Checkout(CheckoutArgs),
Untrack(UntrackArgs),
Files(FilesArgs),
Branch(branch::BranchSubcommand),
#[command(alias = "print")]
Cat(CatArgs),
Diff(DiffArgs),
Show(ShowArgs),
Status(StatusArgs),
Log(LogArgs),
Obslog(ObslogArgs),
Interdiff(InterdiffArgs),
Describe(DescribeArgs),
Checkout(CheckoutArgs),
Commit(CommitArgs),
#[command(subcommand)]
Config(ConfigSubcommand),
#[command(subcommand)]
Debug(DebugCommands),
Describe(DescribeArgs),
Diff(DiffArgs),
Diffedit(DiffeditArgs),
Duplicate(DuplicateArgs),
Abandon(AbandonArgs),
Edit(EditArgs),
New(NewArgs),
Move(MoveArgs),
Squash(SquashArgs),
Unsquash(UnsquashArgs),
Restore(RestoreArgs),
Diffedit(DiffeditArgs),
Resolve(ResolveArgs),
Split(SplitArgs),
Files(FilesArgs),
#[command(subcommand)]
Git(git::GitCommands),
Init(InitArgs),
Interdiff(InterdiffArgs),
Log(LogArgs),
/// Merge work from multiple branches
///
/// Unlike most other VCSs, `jj merge` does not implicitly include the
Expand All @@ -102,22 +97,27 @@ enum Commands {
/// This is the same as `jj new`, except that it requires at least two
/// arguments.
Merge(NewArgs),
Rebase(RebaseArgs),
Backout(BackoutArgs),
#[command(subcommand)]
Branch(branch::BranchSubcommand),
/// Undo an operation (shortcut for `jj op undo`)
Undo(operation::OperationUndoArgs),
Move(MoveArgs),
New(NewArgs),
Obslog(ObslogArgs),
#[command(subcommand)]
#[command(visible_alias = "op")]
Operation(operation::OperationCommands),
#[command(subcommand)]
Workspace(WorkspaceCommands),
Rebase(RebaseArgs),
Resolve(ResolveArgs),
Restore(RestoreArgs),
Show(ShowArgs),
Sparse(SparseArgs),
Split(SplitArgs),
Squash(SquashArgs),
Status(StatusArgs),
/// Undo an operation (shortcut for `jj op undo`)
Undo(operation::OperationUndoArgs),
Unsquash(UnsquashArgs),
Untrack(UntrackArgs),
Version(VersionArgs),
#[command(subcommand)]
Git(git::GitCommands),
#[command(subcommand)]
Debug(DebugCommands),
Workspace(WorkspaceCommands),
}

/// Display version information
Expand Down

0 comments on commit e509a29

Please sign in to comment.