From: martin f. krafft Date: Fri, 1 Nov 2019 01:56:52 +0000 (+1300) Subject: disable task filtering for certain commands X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/31d9529fe14bb21ff87c6e0030890fb32df15834 disable task filtering for certain commands --- diff --git a/.zsh/zshrc/parts.d/50-taskwarrior b/.zsh/zshrc/parts.d/50-taskwarrior index 665f854..2ca20b9 100644 --- a/.zsh/zshrc/parts.d/50-taskwarrior +++ b/.zsh/zshrc/parts.d/50-taskwarrior @@ -10,17 +10,21 @@ if whence task >/dev/null; then function task_() { - local spec cmd args nospec=0 + local filter cmd args nofilter=0 cmd="$1"; shift - [[ "$cmd" = add ]] && nospec=1 + + case "$cmd" in + (add|attach|call) nofilter=1;; + esac + for i in "$@"; do - case "$nospec@$i" in + case "$nofilter@$i" in (0@<->) :;& - (0@/*/) spec="${spec:+$spec }$i";; + (0@/*/) filter="${filter:+$filter }$i";; (*) args="${args:+$args }$i";; esac done - eval task $spec $cmd $args + eval task $filter $cmd $args } function task_postpone() {