Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
Command nesting change: edit is now a subcommand of id.
Browse files Browse the repository at this point in the history
  • Loading branch information
ffranr committed Sep 24, 2019
1 parent f7d66b4 commit 39414e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn run_command(command: opts::Command) -> Result<CommandExitStatus> {
let local = Local::auto_open()?;
local.switch_id(&args.id)?
}
opts::Command::Edit(cmd) => match cmd {
opts::Command::Id(opts::Id::Edit(args)) => match args {
opts::Edit::Readme => {
let local = crev_lib::Local::auto_open()?;
local.edit_readme()?;
Expand Down
8 changes: 4 additions & 4 deletions src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@ pub enum Id {
/// Change current Id
#[structopt(name = "switch")]
Switch(SwitchId),

/// Edit README.md of the current ID
#[structopt(name = "edit")]
Edit(Edit),
}

#[derive(Debug, StructOpt, Clone)]
Expand Down Expand Up @@ -397,10 +401,6 @@ pub enum Command {
#[structopt(name = "id", alias = "new")]
Id(Id),

/// Edit README.md of the current Id, ...
#[structopt(name = "edit")]
Edit(Edit),

/// Query Ids, packages, reviews...
#[structopt(name = "query")]
Query(Query),
Expand Down

0 comments on commit 39414e2

Please sign in to comment.