From ced721374ed8d79bb05e4971e0738f0df067f408 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Sun, 7 Dec 2025 20:51:08 +0000 Subject: [PATCH] zsh: add `turg` function to get most urgent task --- zsh/lib/50-taskwarrior.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zsh/lib/50-taskwarrior.zsh b/zsh/lib/50-taskwarrior.zsh index 84ee1ff..4e6c848 100644 --- a/zsh/lib/50-taskwarrior.zsh +++ b/zsh/lib/50-taskwarrior.zsh @@ -31,6 +31,13 @@ function tick() { task $1 mod wait:${2:-1h} } +function turg() { + local context=$(task _get rc.context) + local context_read=$(task _get rc.context.$context.read) + local urg_task=$(task +READY $context_read _urgency | sort -k4 -n | tail -1 | cut -d" " -f2) + task $urg_task $@ +} + # TODO: function to show the latest report function task_today_list() { -- 2.51.2