From: Samir Benmendil Date: Thu, 13 Mar 2025 20:56:06 +0000 (+0000) Subject: zsh: tick function to wait a while for a task X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/c77653dfa43386ef5c5ded93999104a1238e077c?hp=02401f84da5eb6f7be98dacb4550e91734894c8f zsh: tick function to wait a while for a task --- diff --git a/zsh/lib/50-taskwarrior.zsh b/zsh/lib/50-taskwarrior.zsh index ce423cf..92f56bb 100644 --- a/zsh/lib/50-taskwarrior.zsh +++ b/zsh/lib/50-taskwarrior.zsh @@ -18,6 +18,14 @@ function tparent() { task _get $1.rparent } +function tick() { + if (( # < 1 || # > 2)); then + print >&2 "Usage: $0 [duration]" + return 1 + fi + task $1 mod wait:${2:-1h} +} + function task_today_list() { local task_cmd=(task rc.verbose:nothing) local task_count=$($task_cmd $($task_cmd _get rc.report.today.filter) count)