]> git.madduck.net Git - etc/taskwarrior.git/blobdiff - .bin/task_call

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

directly compare server CA
[etc/taskwarrior.git] / .bin / task_call
index 9f43a67122435bc7ab231bd5a45e0b727fccb212..71c4f766d62d8a3b7fd9cedc0ce9ab1121513895 100755 (executable)
@@ -15,28 +15,34 @@ DATAPAYL="${DATA#*:}"
 case "$DATATYPE" in
   ('')
     echo >&2 I: No link data available for this task.
 case "$DATATYPE" in
   ('')
     echo >&2 I: No link data available for this task.
-    task "$TSK"
+    exec task "$TSK"
     ;;
 
   (msgid)
     ;;
 
   (msgid)
-    mutt -f =store -e "push '<search>~i $DATAPAYL'<enter>"
+    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 '<limit>~(=i\"$DATAPAYL\")<enter><search>=i\"$DATAPAYL\"<enter>'"
+
+    fi
     ;;
 
   (url)
     ;;
 
   (url)
-    sensible-browser "$DATAPAYL"
+    exec sensible-browser "$DATAPAYL"
     ;;
 
   (file)
     if eval test -f "$DATAPAYL"; then
       case "$(file --mime-type "$DATAPAYL")" in
     ;;
 
   (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
     ;;
 
   (*)
       esac
     fi
     ;;
 
   (*)
-    eval run-mailcap --action=edit "$DATAPAYL"
+    eval exec run-mailcap --action=view "$DATAPAYL"
     ;;
 
 esac
     ;;
 
 esac