X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=blobdiff_plain;f=mutt_open;h=6a3cf18ab4bbc0d114a350dd1793491575289912;hp=93e2c4892c250edf310e5d4e26c84ba0e7e5f13e;hb=HEAD;hpb=6116cdfbd104f73e4d3cbdc823024b98049b450f diff --git a/mutt_open b/mutt_open index 93e2c48..6a3cf18 100755 --- a/mutt_open +++ b/mutt_open @@ -15,7 +15,7 @@ MUTT=mutt MAIL_INDEXER="notmuch" # one of "notmuch", "mu" MUTT_FLAGS="-R" -HIDE_SIDEBAR_CMD="B" # set to empty string if sidebar is not used +HIDE_SIDEBAR_CMD="" # set to empty string if sidebar is not used # Sample output of lookup command, which gets passed to mutt-open # /home/zack/Maildir/INBOX/cur/1256673179_0.8700.usha,U=37420,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,S @@ -69,9 +69,11 @@ if ! [ -d "$maildir" ] ; then exit 2 fi +msgid=$(echo -n "$msgid"|sed 's/\([\+\*=]\)/\\\\\1/g') + # UGLY HACK: without sleep, push keys do not reach mutt, I _guess_ that there # might be some terminal-related issue here, since also waiting for an input # with "read" similarly "solves" the problem -sleep 0.1 -mutt_keys="$HIDE_SIDEBAR_CMD/~i$msgid\n\n" +sleep 0.2 +mutt_keys="$HIDE_SIDEBAR_CMD/=i$msgid\n\n" exec $MUTT $MUTT_FLAGS -f "$maildir/" -e "push $mutt_keys"