]> git.donarmstrong.com Git - bin.git/commitdiff
add mutt alias which executes neomutt if that exists
authorDon Armstrong <don@donarmstrong.com>
Wed, 24 Jan 2018 18:33:29 +0000 (10:33 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 24 Jan 2018 18:33:29 +0000 (10:33 -0800)
mutt [new file with mode: 0755]

diff --git a/mutt b/mutt
new file mode 100755 (executable)
index 0000000..35889a7
--- /dev/null
+++ b/mutt
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+cmd_exists () {
+    if which "$1" >/dev/null 2>&1; then
+        return 0;
+    else
+        return 1;
+    fi;
+}
+if cmd_exists neomutt; then
+    exec neomutt "$@";
+fi;
+exec mutt "$@";