Skip to content

Commit 30cd4cf

Browse files
committed
cli: print commands in alphabetical order
Until clap-rs/clap#1553 is fixed, I don't think we can do better than alphabetical order (without a lot of work).
1 parent 4984e61 commit 30cd4cf

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

src/commands/mod.rs

+33-33
Original file line numberDiff line numberDiff line change
@@ -64,34 +64,29 @@ use crate::ui::Ui;
6464

6565
#[derive(clap::Parser, Clone, Debug)]
6666
enum Commands {
67-
Version(VersionArgs),
68-
Init(InitArgs),
67+
Abandon(AbandonArgs),
68+
Backout(BackoutArgs),
6969
#[command(subcommand)]
70-
Config(ConfigSubcommand),
71-
Checkout(CheckoutArgs),
72-
Untrack(UntrackArgs),
73-
Files(FilesArgs),
70+
Branch(branch::BranchSubcommand),
7471
#[command(alias = "print")]
7572
Cat(CatArgs),
76-
Diff(DiffArgs),
77-
Show(ShowArgs),
78-
Status(StatusArgs),
79-
Log(LogArgs),
80-
Obslog(ObslogArgs),
81-
Interdiff(InterdiffArgs),
82-
Describe(DescribeArgs),
73+
Checkout(CheckoutArgs),
8374
Commit(CommitArgs),
75+
#[command(subcommand)]
76+
Config(ConfigSubcommand),
77+
#[command(subcommand)]
78+
Debug(DebugCommands),
79+
Describe(DescribeArgs),
80+
Diff(DiffArgs),
81+
Diffedit(DiffeditArgs),
8482
Duplicate(DuplicateArgs),
85-
Abandon(AbandonArgs),
8683
Edit(EditArgs),
87-
New(NewArgs),
88-
Move(MoveArgs),
89-
Squash(SquashArgs),
90-
Unsquash(UnsquashArgs),
91-
Restore(RestoreArgs),
92-
Diffedit(DiffeditArgs),
93-
Resolve(ResolveArgs),
94-
Split(SplitArgs),
84+
Files(FilesArgs),
85+
#[command(subcommand)]
86+
Git(git::GitCommands),
87+
Init(InitArgs),
88+
Interdiff(InterdiffArgs),
89+
Log(LogArgs),
9590
/// Merge work from multiple branches
9691
///
9792
/// Unlike most other VCSs, `jj merge` does not implicitly include the
@@ -102,22 +97,27 @@ enum Commands {
10297
/// This is the same as `jj new`, except that it requires at least two
10398
/// arguments.
10499
Merge(NewArgs),
105-
Rebase(RebaseArgs),
106-
Backout(BackoutArgs),
107-
#[command(subcommand)]
108-
Branch(branch::BranchSubcommand),
109-
/// Undo an operation (shortcut for `jj op undo`)
110-
Undo(operation::OperationUndoArgs),
100+
Move(MoveArgs),
101+
New(NewArgs),
102+
Obslog(ObslogArgs),
111103
#[command(subcommand)]
112104
#[command(visible_alias = "op")]
113105
Operation(operation::OperationCommands),
114-
#[command(subcommand)]
115-
Workspace(WorkspaceCommands),
106+
Rebase(RebaseArgs),
107+
Resolve(ResolveArgs),
108+
Restore(RestoreArgs),
109+
Show(ShowArgs),
116110
Sparse(SparseArgs),
111+
Split(SplitArgs),
112+
Squash(SquashArgs),
113+
Status(StatusArgs),
114+
/// Undo an operation (shortcut for `jj op undo`)
115+
Undo(operation::OperationUndoArgs),
116+
Unsquash(UnsquashArgs),
117+
Untrack(UntrackArgs),
118+
Version(VersionArgs),
117119
#[command(subcommand)]
118-
Git(git::GitCommands),
119-
#[command(subcommand)]
120-
Debug(DebugCommands),
120+
Workspace(WorkspaceCommands),
121121
}
122122

123123
/// Display version information

0 commit comments

Comments
 (0)