diff options
author | Nora <nora.widdecke@tu-bs.de> | 2019-02-24 21:58:53 +0100 |
---|---|---|
committer | Nora <nora.widdecke@tu-bs.de> | 2019-02-24 21:58:53 +0100 |
commit | 7e2b50b71b0673c6c186e171f0fbc57fa9d3c238 (patch) | |
tree | 5c738b212d236183e584e717611745e772b30c19 | |
parent | e9d6ca5f9c39506210d265a8469b54ad2853499f (diff) |
structopt: delete
-rw-r--r-- | src/actions/delete.rs | 2 | ||||
-rw-r--r-- | src/bin/khaleesi.rs | 2 | ||||
-rw-r--r-- | src/cli.rs | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/actions/delete.rs b/src/actions/delete.rs index 624ac83..734d769 100644 --- a/src/actions/delete.rs +++ b/src/actions/delete.rs @@ -7,7 +7,7 @@ use crate::utils::stdioutils; use std::path::PathBuf; use std::fs::remove_file; -pub fn do_delete(_args: &[&str]) -> KhResult<()> { +pub fn do_delete() -> KhResult<()> { info!("do_delete"); let cursor_khline = input::default_input_khline()?; diff --git a/src/bin/khaleesi.rs b/src/bin/khaleesi.rs index ba8b124..f50f008 100644 --- a/src/bin/khaleesi.rs +++ b/src/bin/khaleesi.rs @@ -45,7 +45,7 @@ fn main_internal(args: &cli::CommandLine, config: &Config) -> KhResult<()> { } cli::Command::Copy => copy::do_copy(), cli::Command::Cursor(x) => cursor::do_cursor(x), - // "delete" => delete::do_delete(args), + cli::Command::Delete => delete::do_delete(), // "edit" => edit::do_edit(args), // "get" => get::action_get(args), cli::Command::Index(x) => index::action_index(x), @@ -26,6 +26,9 @@ pub enum Command { /// Interact with the cursor #[structopt(name = "cursor")] Cursor(Cursor), + /// Delete event + #[structopt(name = "copy")] + Delete, /// Rebuild index #[structopt(name = "index")] Index(Index), |