From: Johannes Weißl Date: Mon, 6 Dec 2010 09:25:14 +0000 (+0100) Subject: escape '\' in git versions of GNU screen X-Git-Url: https://projects.mako.cc/source/muttjump/commitdiff_plain/22c083dee541010933c292439b821ffafa4133ec?hp=9fd12eaff98fa67ef19e4ca149d9429877050ab4 escape '\' in git versions of GNU screen --- diff --git a/TODO b/TODO deleted file mode 100644 index b18b6d4..0000000 --- a/TODO +++ /dev/null @@ -1,2 +0,0 @@ -- Jumping in mutt doesn't work with git-versions of screen if Message-ID - contains characters which must be escaped (screen -X screen ...) diff --git a/muttjump b/muttjump index 3cdb6ed..6f5a1d3 100755 --- a/muttjump +++ b/muttjump @@ -43,6 +43,10 @@ if ! type MUTTJUMP_SCREEN_WINDOW_NAME_MANGLE >/dev/null 2>&1 ; then } fi +# Version of GNU screen +# Since 4.01.00 (commit d87a0d8) backslash handling was altered. +MUTTJUMP_SCREEN_VERSION=${MUTTJUMP_SCREEN_VERSION:-auto} + # program paths MUTT=${MUTT:-mutt} MAIRIX=${MAIRIX:-mairix} @@ -232,6 +236,13 @@ if [ "$MUTTJUMP_MULTI_SCREEN_MODE" = no ] ; then if [ "$MUTTJUMP_USE_SCREEN" = yes ] ; then if [ -n "$STY" ] ; then screen_opts=("-X" "screen") + sv=$MUTTJUMP_SCREEN_VERSION + if [ "$sv" = auto ] ; then + sv=$($SCREEN --version | awk '{print $3}') + fi + if ! echo "$sv" | grep -q "^\(4\.00\|[0-3]\.\)" ; then + jump_cmd=${jump_cmd/\\/\\\\\\} + fi else reopen_tty fi