forked from janek/mostr
1
0
Fork 0

fix: make bookmark and priority filter commands more consistent

This commit is contained in:
xeruf 2024-11-10 20:19:02 +01:00
parent 561fd9e1e5
commit 60b33b1dd3
2 changed files with 5 additions and 4 deletions

View File

@ -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.

View File

@ -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()