feat(cli/org): org edit — flag-driven field update for login/note/identity
This commit is contained in:
@@ -522,8 +522,21 @@ pub(crate) enum OrgCommands {
|
||||
List {
|
||||
#[arg(long)] trashed: bool,
|
||||
},
|
||||
// Item subcommands (Edit/Rm/Restore/Purge) are added by
|
||||
// Tasks B12–B13, which extend this enum.
|
||||
/// Edit an org item's fields (flag-driven; blank flags keep current values).
|
||||
Edit {
|
||||
/// Item id or case-insensitive title substring.
|
||||
query: String,
|
||||
#[arg(long)] title: Option<String>,
|
||||
#[arg(long)] username: Option<String>,
|
||||
#[arg(long)] url: Option<String>,
|
||||
#[arg(long)] password: Option<String>,
|
||||
#[arg(long)] body: Option<String>,
|
||||
#[arg(long)] email: Option<String>,
|
||||
#[arg(long)] phone: Option<String>,
|
||||
#[arg(long)] full_name: Option<String>,
|
||||
},
|
||||
// Item subcommands (Rm/Restore/Purge) are added by
|
||||
// Task B13, which extends this enum.
|
||||
}
|
||||
|
||||
#[derive(clap::Subcommand)]
|
||||
@@ -672,8 +685,12 @@ fn main() -> Result<()> {
|
||||
let d = crate::org_session::org_dir(dir_path)?;
|
||||
commands::org::run_list(&d, trashed)?;
|
||||
}
|
||||
// Item dispatch arms (Edit/Rm/Restore/Purge) added by
|
||||
// Tasks B12–B13.
|
||||
OrgCommands::Edit { query, title, username, url, password, body, email, phone, full_name } => {
|
||||
let d = crate::org_session::org_dir(dir_path)?;
|
||||
commands::org::run_edit(&d, &query, title, username, url, password, body, email, phone, full_name)?;
|
||||
}
|
||||
// Item dispatch arms (Rm/Restore/Purge) added by
|
||||
// Task B13.
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user