summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorburbschat <b.urbschat@tum.de>2023-11-24 21:39:31 +0100
committerburbschat <b.urbschat@tum.de>2023-11-24 21:39:31 +0100
commit0cb17135b9ed52c89f20e671b03decd94ab7b2fe (patch)
treee2686424b2c63498ad02fffdc47d59844266e83e /share
parenta8863a750a360bad6759f5f2c4df5d2001b31e18 (diff)
Fix escaping in message IDs from notmuch
`+` was properly escaped but only once. `$` was not escaped at all. This would result in messages with message IDs containing more than one `+` or at least on `$` to not be shown after limiting. `$` itself has to be escaped presumably for the shell. This results in three prepended backslashes in the limit string and six in the config file, as there backslashes themselves have to be escaped.
Diffstat (limited to 'share')
-rw-r--r--share/mutt-wizard.muttrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc
index 95a9ae9..27ae216 100644
--- a/share/mutt-wizard.muttrc
+++ b/share/mutt-wizard.muttrc
@@ -101,7 +101,7 @@ macro index \eh "<pipe-message>$prefix/libexec/gpg-wks-client --receive | msmtp
macro index,pager a "<enter-command>set my_pipe_decode=\$pipe_decode pipe_decode<return><pipe-message>abook --add-email<return><enter-command>set pipe_decode=\$my_pipe_decode; unset my_pipe_decode<return>" "add the sender address to abook"
macro index \Cr "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
macro index O "<shell-escape>mailsync<enter>" "run mailsync to sync all mail"
-macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern"
+macro index \Cf "<enter-command>unset wait_key<enter><shell-escape>printf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms<enter><limit>~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/g for@a; s/\\$/\\\\\\$/g for@a;print@a' \`\"<enter>" "show only messages matching a notmuch pattern"
macro index A "<limit>all\n" "show all messages (undo limit)"
# Sidebar mappings