From e5953c63b4808cca7955836ab5110f6f9977afc9 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Tue, 30 Jul 2024 21:19:41 +0300 Subject: [PATCH] fix: list properties instead of adding blank column --- README.md | 2 +- src/main.rs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dcfaed..1c2e0ab 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ when the application is terminated regularly. Dots can be repeated to move to parent tasks. -- `:[IND][COL]` - add / remove property column COL to IND or end +- `:[IND][COL]` - add property column COL at IND or end, if it already exists remove property column COL or IND - `>[TEXT]` - Complete active task and move to parent, with optional state description - `<[TEXT]` - Close active task and move to parent, with optional state description - `|TEXT` - Set state for current task from text (also aliased to `/` for now) diff --git a/src/main.rs b/src/main.rs index 8401de1..ba0e7c3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -236,6 +236,24 @@ async fn main() { } } None => { + if arg.is_empty() { + println!("Available properties: +- `id` +- `parentid` +- `name` +- `state` +- `hashtags` +- `tags` - values of all nostr tags associated with the event, except event tags +- `desc` - last note on the task +- `description` - accumulated notes on the task +- `path` - name including parent tasks +- `rpath` - name including parent tasks up to active task +- `time` - time tracked on this task +- `rtime` - time tracked on this tasks and all recursive subtasks +- `progress` - recursive subtask completion in percent +- `subtasks` - how many direct subtasks are complete"); + continue; + } let pos = tasks.properties.iter().position(|s| s == arg); match pos { None => {