Variable: erc-prompt-format

erc-prompt-format is a customizable variable defined in erc.el.gz.

Value

#("%p%m%a·%b>" 0 2 (font-lock-face erc-my-nick-prefix-face) 2 4
  (font-lock-face font-lock-keyword-face) 4 6
  (font-lock-face erc-error-face) 6 7 (font-lock-face shadow) 7 9
  (font-lock-face font-lock-constant-face) 9 10
  (font-lock-face shadow))

Documentation

Format string when erc-prompt(var)/erc-prompt(fun) is erc-prompt-format(var)/erc-prompt-format(fun).

ERC recognizes these substitution specifiers:

 %a - away indicator
 %b - buffer name
 %t - channel or query target, server domain, or dialed address
 %S - target@network or buffer name
 %s - target@server or server
 %N - current network, like Libera.Chat
 %p - channel membership prefix, like @ or +
 %n - current nickname
 %c - channel modes with args for select modes
 %C - channel modes with all args
 %u - user modes
 %m - channel modes sans args in channels, user modes elsewhere
 %M - like %m but show nothing in query buffers

To pick your own colors, do something like:

  (setopt erc-prompt-format
          (concat
           (propertize "%b" 'font-lock-face 'erc-input-face)
           (propertize "%a" 'font-lock-face 'erc-error-face)))

Please remember that ERC ignores this option completely unless the "parent" option erc-prompt(var)/erc-prompt(fun) is set to erc-prompt-format(var)/erc-prompt-format(fun).

This variable was added, or its default value changed, in ERC version
5.6.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defcustom erc-prompt-format erc--prompt-format-face-example
  "Format string when `erc-prompt' is `erc-prompt-format'.
ERC recognizes these substitution specifiers:

 %a - away indicator
 %b - buffer name
 %t - channel or query target, server domain, or dialed address
 %S - target@network or buffer name
 %s - target@server or server
 %N - current network, like Libera.Chat
 %p - channel membership prefix, like @ or +
 %n - current nickname
 %c - channel modes with args for select modes
 %C - channel modes with all args
 %u - user modes
 %m - channel modes sans args in channels, user modes elsewhere
 %M - like %m but show nothing in query buffers

To pick your own colors, do something like:

  (setopt erc-prompt-format
          (concat
           (propertize \"%b\" \\='font-lock-face \\='erc-input-face)
           (propertize \"%a\" \\='font-lock-face \\='erc-error-face)))

Please remember that ERC ignores this option completely unless
the \"parent\" option `erc-prompt' is set to `erc-prompt-format'."
  :package-version '(ERC . "5.6")
  :group 'erc-display
  :type `(choice (const :tag "{Prefix}{Mode}{Away}{MIDDLE DOT}{Buffer}>"
                        ,erc--prompt-format-face-example)
                 string))