ajout macro pour filtre rapide

main
Gil Portenseigne 2025-04-08 09:04:08 +02:00
parent 605a215d8d
commit 97bf900389
1 changed files with 3 additions and 0 deletions

View File

@ -102,6 +102,9 @@ 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 L "<pipe-message>sed -e /^From/d -e s/To:/From:/ | abook --add-email<return>" "add the to: address to abook?"
macro index \Cl "<pipe-message> grep 'From: ' | sed 's/From: //' >| /tmp/sender<enter>:set my_sender=\"`cat /tmp/sender`\"\n l~f \"$my_sender\"\n" "custom filter"
# :set my_sender=\"`cat /tmp/sender`\"\n l~f \"$my_sender\"\n" \
macro index O "<shell-escape>~/.local/bin/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 A "<limit>all\n" "show all messages (undo limit)"