summaryrefslogtreecommitdiffstats
path: root/src/actions/list.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/list.rs')
-rw-r--r--src/actions/list.rs32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/actions/list.rs b/src/actions/list.rs
deleted file mode 100644
index 4c29188..0000000
--- a/src/actions/list.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-use crate::selectors::SelectFilters;
-use crate::input;
-use crate::KhResult;
-use structopt::StructOpt;
-
-#[derive(Debug, StructOpt)]
-pub struct ListArgs {
- /// the arguments for the selection
- #[structopt(name = "args")]
- pub args: Vec<String>,
-}
-
-pub fn list_by_args(args: &[&str]) -> KhResult<()> {
- let lines = input::default_input_khlines()?;
- let filters = SelectFilters::parse_from_args_with_range(args)?;
-
- let events = lines
- .enumerate()
- .filter(|(index, khline)| {
- match khline.to_event() {
- Ok(event) => filters.is_selected_index(*index, &event),
- Err(cause) => { warn!("{}", cause); false },
- }
- });
-
- for (_, khline) in events {
- khprintln!("{}", khline);
- }
-
- Ok(())
-}
-