Don't understand german? Read or subscribe to my english-only feed.

mika’s advent calendar – day 22: patterns in mutt

The console mail client mutt has some nice features and I noticed that even some long time users of mutt don’t use some of the most rocking features. What’s definitely worth knowing: patterns.

Want to display only mails sent from foo@example.org? Select the limit command to show only messages matching a pattern (bound to ‘l’ by default), enter ‘~f foo@example.org’ and press enter. That’s it. Now only mails sent from foo@example.org will be displayed in the index view. To show the currently active limit use the show-limit command (bount to esc-l by default). If you want to get rid of your current active limit view just use ‘all’ as the matching pattern.

Check out the docs for a list of available patterns. For example if you want to get rid of duplicate mails (based on their message id) just use ‘~=’ as the pattern. You can either tag the selected messages (using tag-pattern, keybinding ‘T’ by default) and delete the tagged messages then or directly invoke the delete-pattern (bound to ‘D’ by default).

Limiting and tagging in mutt using patterns really rocks, if you are using mutt you definitely should use these features.

One Response to “mika’s advent calendar – day 22: patterns in mutt”

  1. jpjacobs Says:

    For those who’s ~ is not comfortably placed in their keyboard layout, = will do too. (so use =f from@blah.com instead of ~f)