diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-23 11:42:48 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-23 11:42:48 +0300 |
commit | 8c97336307737aa121bd57d09cd0daaa477c7913 (patch) | |
tree | 7c23d03cf41c66d6f5eac6c3b7af8429c2b04d77 /ui/src/execute.rs | |
parent | 2d7f9ca46f01d7917f1bff4623dbcef7ec92de03 (diff) |
ui: add set as read/unread, delete actions
Implemented only in compact listing for now.
Diffstat (limited to 'ui/src/execute.rs')
-rw-r--r-- | ui/src/execute.rs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/ui/src/execute.rs b/ui/src/execute.rs index d74da648..c48b2739 100644 --- a/ui/src/execute.rs +++ b/ui/src/execute.rs @@ -90,6 +90,10 @@ named!( toggle<Action>, preceded!(tag!("set "), alt_complete!(threaded | plain | compact)) ); +named!( + listing_action<Action>, + alt_complete!(toggle | envelope_action | filter | toggle_thread_snooze) +); named!( toggle_thread_snooze<Action>, @@ -118,6 +122,19 @@ named!( ) ); +named!( + envelope_action<Action>, + alt_complete!( + preceded!( + ws!(tag!("set")), + alt_complete!( + map!(ws!(tag!("read")), |_| Listing(SetRead)) + | map!(ws!(tag!("unread")), |_| Listing(SetUnread)) + ) + ) | map!(ws!(tag!("delete")), |_| Listing(Delete)) + ) +); + named!(pub parse_command<Action>, - alt_complete!( goto | toggle | sort | subsort | close | toggle_thread_snooze | mailinglist |filter) + alt_complete!( goto | listing_action | sort | subsort | close | mailinglist) ); |