Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: print commands in alphabetical order #1344

Merged
merged 1 commit into from
Mar 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 33 additions & 33 deletions src/commands/mod.rs
Original file line number Diff line number Diff line change
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