From 22c083dee541010933c292439b821ffafa4133ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Wei=C3=9Fl?= Date: Mon, 6 Dec 2010 10:25:14 +0100 Subject: [PATCH] escape '\' in git versions of GNU screen --- TODO | 2 -- muttjump | 11 +++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) delete mode 100644 TODO 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 -- 2.39.5