X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/a1b88a4611f98012432130e7d9ff6c5ed32b9eae..5d8f7cd1564742c9756962d7429cf6e63040d49f:/.bin/task_call?ds=sidebyside diff --git a/.bin/task_call b/.bin/task_call index 9f43a67..71c4f76 100755 --- a/.bin/task_call +++ b/.bin/task_call @@ -15,28 +15,34 @@ DATAPAYL="${DATA#*:}" case "$DATATYPE" in ('') echo >&2 I: No link data available for this task. - task "$TSK" + exec task "$TSK" ;; (msgid) - mutt -f =store -e "push '~i $DATAPAYL'" + if command -v neomutt >/dev/null && command -v notmuch >/dev/null; then + exec neomutt -f "notmuch://$HOME/mail/?query=thread:{mid:$DATAPAYL}" + + else + exec mutt -f =store -e "push '~(=i\"$DATAPAYL\")=i\"$DATAPAYL\"'" + + fi ;; (url) - sensible-browser "$DATAPAYL" + exec sensible-browser "$DATAPAYL" ;; (file) if eval test -f "$DATAPAYL"; then case "$(file --mime-type "$DATAPAYL")" in - (*": text/"*) eval sensible-editor "$DATAPAYL";; - (*) eval run-mailcap --action=edit "$DATAPAYL";; + (*": text/"*) eval exec sensible-editor "$DATAPAYL";; + (*) eval exec run-mailcap --action=view "$DATAPAYL";; esac fi ;; (*) - eval run-mailcap --action=edit "$DATAPAYL" + eval exec run-mailcap --action=view "$DATAPAYL" ;; esac