feat(cli/org): org document edit via --file + purge removes attachments
This commit is contained in:
@@ -541,6 +541,8 @@ pub(crate) enum OrgCommands {
|
||||
query: String,
|
||||
/// Replace the login TOTP secret from a QR image.
|
||||
#[arg(long)] totp_qr: Option<std::path::PathBuf>,
|
||||
/// Replace a Document item's attachment file.
|
||||
#[arg(long)] file: Option<std::path::PathBuf>,
|
||||
},
|
||||
/// Soft-delete an org item (reversible via `org restore`).
|
||||
Rm { query: String },
|
||||
@@ -760,9 +762,9 @@ fn main() -> Result<()> {
|
||||
let d = crate::org_session::org_dir(dir_path)?;
|
||||
commands::org::run_list(&d, trashed)?;
|
||||
}
|
||||
OrgCommands::Edit { query, totp_qr } => {
|
||||
OrgCommands::Edit { query, totp_qr, file } => {
|
||||
let d = crate::org_session::org_dir(dir_path)?;
|
||||
commands::org::run_edit(&d, &query, totp_qr)?;
|
||||
commands::org::run_edit(&d, &query, totp_qr, file)?;
|
||||
}
|
||||
OrgCommands::Rm { query } => {
|
||||
let d = crate::org_session::org_dir(dir_path)?;
|
||||
|
||||
Reference in New Issue
Block a user