From 60b33b1dd3db13f9ccf7298c348cb6a6a12b47ab Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Sun, 10 Nov 2024 20:19:02 +0100 Subject: [PATCH] fix: make bookmark and priority filter commands more consistent --- README.md | 3 ++- src/main.rs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a0c0393..06aea18 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,7 @@ Append `@TIME` to any task creation or change command to record the action with - with string argument, find first matching task in history - with int argument, jump back X tasks in history - undo last action (moving in place or upwards confirms pending actions) +- `*` - (un)bookmark current task or list all bookmarks - `wss://...` - switch or subscribe to relay (prefix with space to forcibly add a new one) Property Filters: @@ -171,7 +172,7 @@ Property Filters: - `+TAG` - add tag filter (empty: list all used tags) - `-TAG` - remove tag filters (by prefix) - `?STATUS` - set status filter (type or description) - plain `?` to reset, `??` to show all -- `*INT` - set priority filter +- `*INT` - set priority filter - `**` to reset - `@[AUTHOR|TIME]` - filter by time or author (pubkey, or `@` for self, TBI: id prefix, name prefix) Status descriptions can be used for example for Kanban columns or review flows. diff --git a/src/main.rs b/src/main.rs index 37b96cd..f8ab93c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -537,7 +537,8 @@ async fn main() -> Result<()> { match arg { None => match tasks.get_position() { None => { - tasks.set_priority(None); + info!("Showing only bookmarked tasks"); + tasks.set_view_bookmarks(); } Some(pos) => match or_warn!(tasks.toggle_bookmark(pos)) { @@ -548,8 +549,7 @@ async fn main() -> Result<()> { }, Some(arg) => { if arg == "*" { - info!("Showing only bookmarked tasks"); - tasks.set_view_bookmarks(); + tasks.set_priority(None); } else { tasks.set_priority(arg.parse() .inspect_err(|e| warn!("Invalid Priority {arg}: {e}")).ok()