aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@debian.org>2013-07-25 08:34:01 -0400
committerRyan Kavanagh <rak@debian.org>2013-07-25 08:45:10 -0400
commita9e6361a4f1a3032dc209a3175a1206943f1751a (patch)
tree3583bc5dd9fd8f6f6518d8961f07782fd6c32958 /bin
parentAdded my mailrc/nailrc (diff)
Added mailx-alias script which converts mutt aliases to mailx aliases
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mailx-alias13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/mailx-alias b/bin/mailx-alias
new file mode 100755
index 0000000..c1d961a
--- /dev/null
+++ b/bin/mailx-alias
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+MUTT_ALIAS=${HOME}/.mutt/alias.rc
+MAILX_ALIAS=${HOME}/.mailx-aliases.rc
+
+awk '{
+ NAME="";
+ for (i = 3; i < NF; i++) {
+ NAME=NAME " " $i;
+ };
+ NAME = substr(NAME, 2);
+ print "alias", $2, "\"" $NF, "(" NAME ")\"";
+}' $MUTT_ALIAS > $MAILX_ALIAS