From 4a3cf55bc11ba190a3d13ff8aa0db4a5b69428e6 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 1 May 2022 11:47:02 +0800 Subject: Update notmuch with mutt --- .mutt/keybindings | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.mutt/keybindings') diff --git a/.mutt/keybindings b/.mutt/keybindings index 60e3178..f648e70 100644 --- a/.mutt/keybindings +++ b/.mutt/keybindings @@ -12,3 +12,8 @@ bind attach,index G last-entry bind index,pager \Cn sidebar-next bind index,pager \Cp sidebar-prev + +# '^L' performs a notmuch query, showing only the results +macro index \Cl "unset wait_keyread -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\^id:// for@a;s/\\+/\\\\+/g for@a;s/=/\\\\=/g for@a;$,=\"|\";print@a'\`\"" "show only messages matching a notmuch pattern" +# 'a' shows all messages again (supersedes default binding) +macro index a "all\n" "show all messages (undo limit)" -- cgit v1.2.3