AERC(1) # NAME aerc - a pretty good email client. # SYNOPSIS *aerc* [*-h*] [*-v*] [*-a* __] [*-C* __] [*-A* __] [*-B* __] [*-I*] [*mailto:*_<...>_ | *mbox:*__ | :__] For a guided tutorial, use *:help tutorial* from aerc, or *man aerc-tutorial* from your terminal. # OPTIONS *-h*, *--help* Show aerc usage help and exit. *-v*, *--version* Print the installed version of aerc and exit. *-a* __++ *--account* __ Load only the named account, as opposed to all configured accounts. It can also be a comma separated list of names. This option may be specified multiple times. The account order will be preserved. *-C* __++ *--aerc-conf* __ Instead of using _$XDG_CONFIG_HOME/aerc/aerc.conf_ use the file at the specified path for configuring aerc. *-A* __++ *--accounts-conf* __ Instead of using _$XDG_CONFIG_HOME/aerc/accounts.conf_ use the file at the specified path for configuring accounts. *-B* __++ *--binds-conf* __ Instead of using _$XDG_CONFIG_HOME/aerc/binds.conf_ use the file at the specified path for configuring binds. *-I*, *--no-ipc* Run commands (*mailto:*_..._, *:*__, *mbox:*__) directly in this instance rather than over IPC in an existing aerc instance. Also disable creation of an IPC server for subsequent aerc instances to communicate with this one. *mailto:*_address[,address][?query[&query]]_ Open the composer with the address(es) in the To field. These addresses must not be percent encoded. If aerc is already running (and IPC is not disabled), the composer is started in that instance; otherwise a new instance is started with the composer. The following (optional) query parameters are supported: [[ *Query* :[ *Description* | _subject=_ : Subject line will be completed with the __ | _body=_ : Message body will be completed with the __ | _cc=
[,
]_ : Cc header will be completed with the list of addresses | _bcc=
[,
]_ : Bcc header will be completed with the list of addresses | _in-reply-to=_ : In-reply-to header will be set to the message id | _account=_ : Specify the account (must be in _accounts.conf_; default is the selected account) | _template=_ : Template sets the template file for creating the message Note that reserved characters in the queries must be percent encoded. *:*__ Run an aerc-internal command as you would in Ex-Mode. See *RUNTIME COMMANDS* below. The command to be executed and its arguments can either be passed as separate arguments in the shell (e.g., _aerc :cmd arg1 arg2_) or as a single argument in the shell (e.g., _aerc ":cmd arg1 arg2"_). In the former case, aerc may add quotes to the command before it is parsed in an attempt to preserve arguments containing spaces and other special characters. In the latter case, aerc will parse the command verbatim, as if it had been typed directly on aerc's command line. This latter form can be helpful for commands that don't interpret quotes in their arguments. If aerc is already running (and IPC is not disabled), the command is run in that instance; otherwise a new instance is started with the command. *mbox:*__ Open the specified mbox file as a virtual temporary account. If aerc is already running (and IPC is not disabled), the file is opened in that instance; otherwise a new instance is started with the file. # RUNTIME COMMANDS To execute a command, press *:* to bring up the command interface. Commands may also be bound to keys, see *aerc-binds*(5) for details. In some contexts, such as the terminal emulator, ** is used to bring up the command interface. Different commands work in different contexts, depending on the kind of tab you have selected. Dynamic arguments are expanded following *aerc-templates*(7) depending on the context. For example, if you have a message selected, the following command: ``` :filter -f "{{index (.From | emails) 0}}" ``` Will filter all messages sent by the same sender. Aerc stores a history of commands, which can be cycled through in command mode. Pressing the up key cycles backwards in history, while pressing down cycles forwards. ## GLOBAL COMMANDS These commands work in any context. *:help* __++ *:man* __ Display one of aerc's man pages in the embedded terminal. *:help* *keys*++ *:man* *keys* Display the active key bindings in the current context. *:new-account* [*-t*] Start the new account wizard. *-t*: Create a temporary account. Do not modify _accounts.conf_. *:cd* __ Changes aerc's current working directory. *:z* __ Changes aerc's current working directory using zoxide. If zoxide is not on *$PATH*., the command will not be registered. *:change-tab* [*+*|*-*]__++ *:ct* [*+*|*-*]__ Changes the focus to the tab with the given name. If a number is given, it's treated as an index. If the number is prepended with *+* or *-*, the number is interpreted as a delta from the selected tab. If only a *-* is given, changes the focus to the previously selected tab. *:exec* __ Executes an arbitrary command in the background. Aerc will set the environment variables *$account* and *$folder* when the command is executed from an Account tab or an opened message. Note: commands executed in this way are not executed with the shell. *:eml* [__]++ *:preview* [__] Opens an eml file and displays the message in the message viewer. Can also be used in the message viewer to open an rfc822 attachment or in the composer to preview the message. *:pwd* Displays aerc's current working directory in the status bar. *:send-keys* __ Send keystrokes to the currently visible terminal, if any. Can be used to control embedded editors to save drafts or quit in a safe manner. Here's an example of quiting a Vim-like editor: *:send-keys* _:wq!_ Note: when used in _binds.conf_ (see *aerc-binds*(5)), angle brackets need to be escaped in order to make their way to the command: = :send-keys \\:wq!\\ This way the __ and the first __ keystrokes are passed to *:send-keys*, while the last __ keystroke is executed directly, committing the *:send-keys* command's execution. *:term* [_..._]++ *:terminal* [_..._] Opens a new terminal tab with a shell running in the current working directory, or the specified command. *:move-tab* [_+_|_-_]__ Moves the selected tab to the given index. If _+_ or _-_ is specified, the number is interpreted as a delta from the selected tab. *:prev-tab* [__]++ *:next-tab* [__] Cycles to the previous or next tab in the list, repeating __ times (default: _1_). *:pin-tab* Moves the current tab to the left of all non-pinned tabs and displays the *pinned-tab-marker* (default: _`_) to the left of the tab title. *:unpin-tab* Removes the *pinned-tab-marker* from the current tab and returns the tab to its previous location. *:prompt* __ _..._ Displays the prompt on the status bar, waits for user input, then appends that input as the last argument to the command and executes it. The input is passed as one argument to the command, unless it is empty, in which case no extra argument is added. *:menu* [*-c* _""_] [*-e*] [*-b*] [*-a*] [*-d*] __ Opens a popover dialog running _sh -c ""_ (if not specified *[general].default-menu-cmd* will be used). When the command exits, all lines printed on its standard output will be appended to __ and executed as a standard aerc command like *xargs*(1) would do when used in a shell. A colon (*:*) prefix is supported for __ but is not required. *:menu* can be used without an external program by setting __ to _-_. This also acts as a fallback in case where no __ was specified at all or the executable in the __ was not found. *-c* _""_ Override *[general].default-menu-cmd*. See *aerc-config*(5) for more details. *-e*: Stop executing commands on the first error. *-b*: Do *NOT* spawn the popover dialog. Start the commands in the background (*NOT* in a virtual terminal). Use this if __ is a graphical application that does not need a terminal. __ may be fed with input text using the following flags: *-a*: All account names, one per line. E.g.: '' LF *-d*: All current account directory names, one per line. E.g.: '' LF *-ad*: All directories of all accounts, one per line. E.g.: '' '' LF Quotes may be added by aerc when either tokens contain special characters. The quotes should be preserved for __. Examples: ``` :menu -adc fzf :cf -a :menu -c 'fzf --multi' :attach :menu -dc 'fzf --multi' :cp :menu -bc 'dmenu -l 20' :cf :menu -c 'ranger --choosefiles=%f' :attach ``` This may also be used in key bindings (see *aerc-binds*(5)): ``` = :menu -adc fzf :cf -a ``` *:choose* *-o* __ __ __ [*-o* __ __ __]... Prompts the user to choose from various options. *:reload* [*-B*] [*-C*] [*-s* __] Hot-reloads the config files for the key binds and general *aerc* config. Reloading of the account config file is not supported. If no flags are provided, _binds.conf_, _aerc.conf_, and the current styleset will all be reloaded. *-B*: Reload _binds.conf_. *-C*: Reload _aerc.conf_. *-s* __ Load the specified styleset. *:suspend* Suspends the aerc process. Some ongoing connections may be terminated. *:quit* [*-f*]++ *:exit* [*-f*]++ *:q* [*-f*] Exits aerc. If a task is being performed that should not be interrupted (like sending a message), a normal quit call might fail. In this case, closing aerc can be forced with the *-f* option. *:redraw* Force a full redraw of the screen. ## MESSAGE COMMANDS These commands are valid in any context that has a selected message (e.g. the message list, the message in the message viewer, etc). *:archive* [*-m* __] __ Moves the selected message to the archive. The available schemes are: _flat_: No special structure, all messages in the archive directory _year_: Messages are stored in folders per year _month_: Messages are stored in folders per year and subfolders per month The *-m* option sets the multi-file strategy. See *aerc-notmuch*(5) for more details. *:accept* [*-e*|*-E*] Accepts an iCalendar meeting invitation. This opens a compose window with a specially crafted attachment. Sending the email will let the inviter know that you accepted and will likely update their calendar as well. This will NOT add the meeting to your own calendar, that must be done as a separate manual step (e.g. by piping the text/calendar part to an appropriate script). *-e*: Forces *[compose].edit-headers* = _true_ for this message only. *-E*: Forces *[compose].edit-headers* = _false_ for this message only. *:accept-tentative* [*-e*|*-E*] Accepts an iCalendar meeting invitation tentatively. *-e*: Forces *[compose].edit-headers* = _true_ for this message only. *-E*: Forces *[compose].edit-headers* = _false_ for this message only. *:copy* [*-dp*] [*-a* __] [*-m* __] __++ *:cp* [*-dp*] [*-a* __] [*-m* __] __ Copies the selected message(s) to __. *-d*: Decrypt the message before copying. *-p*: Create __ if it does not exist. *-a*: Copy to __ of __. If __ does not exist, it will be created whether or not *-p* is used. *-m*: Set the multi-file strategy. See *aerc-notmuch*(5) for more details. *:decline* [*-e*|*-E*] Declines an iCalendar meeting invitation. *-e*: Forces *[compose].edit-headers* = _true_ for this message only. *-E*: Forces *[compose].edit-headers* = _false_ for this message only. *:delete* [*-m* __]++ *:delete-message* [*-m* __] Deletes the selected message. *-m*: Set the multi-file strategy. See *aerc-notmuch*(5) for more details. *:envelope* [*-h*] [*-s* __] Opens the message envelope in a dialog popup. *-h*: Show all header fields *-s* __ User-defined format specifier requiring two _%s_ for the key and value strings. Default format: _%-20.20s: %s_ *:recall* [*-f*] [*-e*|*-E*] Opens the selected message for re-editing. Messages can only be recalled from the postpone directory. *-f*: Open the message for re-editing even if it is not in the postpone directory. Aerc remembers the folder, so the further *:postpone* call will save the message back there. *-e*: Forces *[compose].edit-headers* = _true_ for this message only. *-E*: Forces *[compose].edit-headers* = _false_ for this message only. Original recalled messages are deleted if they are sent or postponed again. In both cases you have another copy of the message somewhere. Otherwise the recalled message is left intact. This happens if the recalled message is discarded after editing. It can be deleted with *:rm* if it is not needed. *:forward* [*-A*|*-F*] [*-T* __] [*-e*|*-E*] [_
_...] Opens the composer to forward the selected message to another recipient. *-A*: Forward the message and all attachments. *-F*: Forward the full message as an RFC 2822 attachment. *-T* __ Use the specified template file for creating the initial message body. Unless *-F* is specified, this defaults to what is set as *forwards* in the *[templates]* section of _aerc.conf_. *-e*: Forces *[compose].edit-headers* = _true_ for this message only. *-E*: Forces *[compose].edit-headers* = _false_ for this message only. *:move* [*-p*] [*-a* __] [*-m* __] __++ *:mv* [*-p*] [*-a* __] [*-m* __] __ Moves the selected message(s) to __. *-p*: Create __ if it does not exist. *-a*: Move to __ of __. If __ does not exist, it will be created whether or not *-p* is used. *-m*: Set the multi-file strategy. See *aerc-notmuch*(5) for more details. *:patch* __ Patch management sub-commands. See *aerc-patch*(7) for more details. *:pipe* [*-bdmps*] __ Downloads and pipes the selected message into the given shell command (executed with _sh -c ""_), and opens a new terminal tab to show the result. By default, the selected message part is used in the message viewer and the full message is used in the message list. Operates on multiple messages when they are marked. When piping multiple messages, aerc will write them with mbox format separators. *-b*: Run the command in the background instead of opening a terminal tab *-d*: Pipe the (full) message but decrypt it first. *-m*: Pipe the full message *-p*: Pipe just the selected message part, if applicable *-s*: Silently close the terminal tab after the command is completed This can be used to apply patch series with git: *:pipe -m* _git am -3_ When at least one marked message subject matches a patch series (e.g. _[PATCH X/Y]_), all marked messages will be sorted by subject to ensure that the patches are applied in order. *:reply* [*-acq*] [*-T* __] [*-A* __] [*-e*|*-E*] Opens the composer to reply to the selected message. *-a*: Reply all *-c*: Close the view tab when replying. If the reply is not sent, reopen the view tab. *-q*: Insert a quoted version of the selected message into the reply editor *-T* __ Use the specified template file for creating the initial message body. If *-q* is specified, defaults to what is set as *quoted-reply* in the *[templates]* section of _aerc.conf_. *-A*_: __ Reply with the specified account instead of the current one. *-e*: Forces *[compose].edit-headers* = _true_ for this message only. *-E*: Forces *[compose].edit-headers* = _false_ for this message only. *:read* [*-t*] Marks the marked or selected messages as read. *-t*: Toggle the messages between read and unread. *:unread* [*-t*] Marks the marked or selected messages as unread. *-t*: Toggle the messages between read and unread. *:flag* [*-t*] [*-a* | *-x* __] Sets (enables) a certain flag on the marked or selected messages. *-t*: Toggle the flag instead of setting (enabling) it. *-a*: Mark message as answered/unanswered. *-x* __: Mark message with specific flag. The available flags are (adapted from RFC 3501, section 2.3.2): _Seen_ Message has been read _Answered_ Message has been answered _Forwarded_ Message has been forwarded _Flagged_ Message is flagged for urgent/special attention _Draft_ Message is a draft *:unflag* [*-t*] __ Operates exactly like *:flag*, defaulting to unsetting (disabling) flags. *:modify-labels* [_+_|_-_]_