AERC-SEARCH(1)
πΈ aerc-search(1) β the search glow-up guide πΈ
okay bestie, welcome to aerc-search(1) β it's from the General Commands Manual section and it's literally the cheat sheet for finding stuff in aerc(1). Think of it as your group chat search bar but make it β¨powerfulβ¨.
This page covers the filter/search patterns and options β the syntax works for every backend, no cap. π
β¨ SYNTAX β¨
so this syntax is common to all backends, meaning you don't gotta relearn it per backend. iconic behavior fr fr.
:filter [-rubave] [-x <flag>] [-X <flag>] [-H <header>:[<value>]] [-f <from>] [-t <to>] [-c <cc>] [-d <start[..end]>] [<terms>...]
:search [-rubave] [-x <flag>] [-X <flag>] [-H <header>:[<value>]] [-f <from>] [-t <to>] [-c <cc>] [-d <start[..end]>] [<terms>...]
Both of these search the current folder for messages matching the set of conditions you give em. π«Ά
:filterβ this one restricts the displayed messages to only the search results. like, it actually hides everything else. main character filtering energy.:searchβ the searching one, but it doesn't hide your other messages from view the way:filterdoes.
Each space separated term of <terms>, if you provided any, gets searched case-insensitively among subject lines β unless you threw in -b or -a. π
π the options (yes, all of them)
-rβ search for read messages-uβ search for unread messages-x <flag>,-X <flag>β restrict search to messages with or without<flag>- use
-xto search for messages with the flag set - use
-Xto search for messages without the flag set
- use
possible values are:
seenβ read messagesansweredβ replied messagesforwardedβ forwarded messagesflaggedβ flagged messagesdraftβ draft messages
-H <header>:[<value>]β search in the headers of the messages for a specific<header>that matches<value>.<value>can be omitted to only search for a<header>. if either the<header>or the<value>contain a space then the whole argument needs to be escaped with quotes. β οΈ note: spaces around<value>are trimmed.-bβ search in the body of the messages-aβ search in the entire text of the messages-vβ exclude messages which match this search (inverse queen π)-eβ instruct the backend to use a custom search extension (such asX-GM-EXT-1if available). search terms are expected in<terms>; other flags will be ignored. π«‘-f <from>β search for messages from<from>-t <to>β search for messages to<to>-c <cc>β search for messages cc'ed to<cc>-d <since[..until]>β search for messages within a particular date range between since and until, excluding the latter (in mathematical notation: search for messages in the[since, until)interval). until can be omitted to only search for<since>to present.
π¦ date formats for -d (iykyk)
spaces and underscores are allowed in relative dates to improve readability. yes bestie, readability matters π
YYYY-MM-DDtoday,yesterday(this|last) (year|month|week)- Weekdays, Monthnames β can also be abbreviated, so
Monday..Tuesdaycan be written asMon..TueandFebruary..MarchasFeb..Mar. <N> (y[ear]|m[onth]|w[eek]|d[ay])β<N>is a positive integer that represents the number of time units in the past. multiple relative terms can be accumulated. the units can also be abbreviated by a single letter such that yesterday would correspond to1d(equivalent to1 dayor1_day) and 8 days ago would be either1w1dor8d. π§
π₯ CUSTOM IMAP EXTENSIONS π₯
the Gmail IMAP extension (X-GM-EXT-1) can be used for searching and filtering. to use this custom extension, make sure it is activated (see aerc-imap(5)) and use the extension -e flag in your :filter or :search commands. slay π
example:
:filter -e filename:pdf from:bob
:filter -e has:attachment newer_than:2d
:search -e is:read is:starred
:search -e list:~rjarry/aerc-devel@lists.sr.ht
π NOTMUCH π
for notmuch, it is possible to avoid using the above flags and only rely on notmuch search syntax. lowkey a vibe.
:filter query...
:search query...
you can use the full notmuch query language as described in notmuch-search-terms(7). π
the query will only apply on top of the active folder query β so it stacks, it doesn't replace. no cap.
example, jump to next unread:
:search tag:unread
β SEE ALSO β
π AUTHORS π
originally created by Drew DeVault and maintained by Robin Jarry who is assisted by other open source contributors. for more information about aerc development, see https://sr.ht/~rjarry/aerc/. π
and that's the whole page bestie π go forth and search, filter, and generally ate π
β with love, the general commands manual, dated 2026-09-07, AERC-SEARCH(1) out. π«Άβ¨
π¦ where this page comes from
- arch rolling: aerc 0.22.0-1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms