mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-23 18:21:38 +03:00
Implements subcommand ordering and updates subcommand descriptions
This commit is contained in:
parent
9d67019cac
commit
426bb46662
@ -22,7 +22,7 @@ impl CLI for BuildCommand {
|
||||
type Output = (Compiler<Fr, EdwardsProjective>, bool);
|
||||
|
||||
const NAME: NameType = "build";
|
||||
const ABOUT: AboutType = "Compile the current package";
|
||||
const ABOUT: AboutType = "Compile the package as a program";
|
||||
const ARGUMENTS: &'static [ArgumentType] = &[];
|
||||
const FLAGS: &'static [FlagType] = &[];
|
||||
const OPTIONS: &'static [OptionType] = &[];
|
||||
|
@ -15,7 +15,7 @@ impl CLI for DeployCommand {
|
||||
type Output = ();
|
||||
|
||||
const NAME: NameType = "deploy";
|
||||
const ABOUT: AboutType = "Deploy package as program to the network (*)";
|
||||
const ABOUT: AboutType = "Deploy the package as a program to the network (*)";
|
||||
const ARGUMENTS: &'static [ArgumentType] = &[];
|
||||
const FLAGS: &'static [FlagType] = &[];
|
||||
const OPTIONS: &'static [OptionType] = &[];
|
||||
|
@ -15,7 +15,7 @@ impl CLI for PublishCommand {
|
||||
type Output = ();
|
||||
|
||||
const NAME: NameType = "publish";
|
||||
const ABOUT: AboutType = "Package circuit and upload this package to the registry (*)";
|
||||
const ABOUT: AboutType = "Publish the package to the package manager (*)";
|
||||
const ARGUMENTS: &'static [ArgumentType] = &[];
|
||||
const FLAGS: &'static [FlagType] = &[];
|
||||
const OPTIONS: &'static [OptionType] = &[];
|
||||
|
17
leo/main.rs
17
leo/main.rs
@ -17,16 +17,15 @@ fn main() -> Result<(), CLIError> {
|
||||
AppSettings::DisableVersion,
|
||||
AppSettings::SubcommandRequiredElseHelp,
|
||||
])
|
||||
// TODO (howardwu): Print subcommands in non-alphabetical order, instead print as ordered here.
|
||||
.subcommands(vec![
|
||||
NewCommand::new(),
|
||||
InitCommand::new(),
|
||||
BuildCommand::new(),
|
||||
SetupCommand::new(),
|
||||
ProveCommand::new(),
|
||||
RunCommand::new(),
|
||||
PublishCommand::new(),
|
||||
DeployCommand::new(),
|
||||
NewCommand::new().display_order(0),
|
||||
InitCommand::new().display_order(1),
|
||||
BuildCommand::new().display_order(2),
|
||||
SetupCommand::new().display_order(3),
|
||||
ProveCommand::new().display_order(4),
|
||||
RunCommand::new().display_order(5),
|
||||
PublishCommand::new().display_order(6),
|
||||
DeployCommand::new().display_order(7),
|
||||
])
|
||||
.set_term_width(0)
|
||||
.get_matches();
|
||||
|
Loading…
Reference in New Issue
Block a user