]> projects.mako.cc - muttjump/commitdiff
even shorter solution
authorJohannes Weißl <jargon@molb.org>
Mon, 29 Nov 2010 14:46:29 +0000 (15:46 +0100)
committerJohannes Weißl <jargon@molb.org>
Mon, 29 Nov 2010 14:46:29 +0000 (15:46 +0100)
by Erik Christiansen <dvalin@internode.on.net>

muttjump

index 8ff2625d3a63462ca455c282a68077d9e5d10341..e2f04ecee410806210ff65b98f439069f77f9050 100755 (executable)
--- a/muttjump
+++ b/muttjump
@@ -143,7 +143,7 @@ if [ "$MUTTJUMP_USE_SCREEN" = no ] ; then
     # mutt behaves different if STDIN is no terminal
     # TODO: Find cleaner solution (e.g. mutt command-line argument?)
     exec 0<&-
-    term="/dev/$(ps -p$$ | awk 'END { print $2 }')"
+    term="/dev/$(ps -p$$ -otty=)"
     exec < $term
 
     # start mutt, open original folder and jump to the original message

Benjamin Mako Hill || Want to submit a patch?