summaryrefslogtreecommitdiffstats
path: root/ui/src/execute.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/execute.rs')
-rw-r--r--ui/src/execute.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/ui/src/execute.rs b/ui/src/execute.rs
index aed01e3a..81822637 100644
--- a/ui/src/execute.rs
+++ b/ui/src/execute.rs
@@ -27,6 +27,7 @@ use std;
pub mod actions;
pub use crate::actions::Action::{self, *};
pub use crate::actions::ListingAction::{self, *};
+pub use crate::actions::MailingListAction::{self, *};
pub use crate::actions::TabAction::{self, *};
named!(
@@ -95,6 +96,19 @@ named!(
map!(ws!(tag!("toggle_thread_snooze")), |_| ToggleThreadSnooze)
);
+named!(
+ mailinglist<Action>,
+ alt_complete!(
+ map!(ws!(tag!("list-post")), |_| MailingListAction(ListPost))
+ | map!(ws!(tag!("list-unsubscribe")), |_| MailingListAction(
+ ListUnsubscribe
+ ))
+ | map!(ws!(tag!("list-archive")), |_| MailingListAction(
+ ListArchive
+ ))
+ )
+);
+
named!(pub parse_command<Action>,
- alt_complete!( goto | toggle | sort | subsort | close | toggle_thread_snooze)
+ alt_complete!( goto | toggle | sort | subsort | close | toggle_thread_snooze | mailinglist)
);