Skip to content

Instantly share code, notes, and snippets.

@flatcap
Created March 6, 2023 14:15
Show Gist options
  • Save flatcap/2072d5ca30f59033ed8bdf09728aa594 to your computer and use it in GitHub Desktop.
Save flatcap/2072d5ca30f59033ed8bdf09728aa594 to your computer and use it in GitHub Desktop.
Patterns vs Regexes

Patterns vs Regexes

$default_hook

Default: "~f %s !~P | (~P ~C %s)"

Applies to hooks:

  • fcc-hook
  • fcc-save-hook
  • index-format-hook
  • message-hook
  • reply-hook
  • save-hook
  • send-hook
  • send2-hook

Doesn't affect hooks:

  • account-hook
  • append-hook, close-hook, open-hook (compression)
  • crypt-hook
  • folder-hook
  • mbox-hook
  • pgp-hook
  • startup-hook, shutdown-hook, timeout-hook (global)

See: mutt_parse_hook(), mutt_parse_idxfmt_hook()

$simple_search

Default: "~f %s | ~s %s"

Applies to functions:

  • <delete-pattern>
  • <limit>
  • <tag-pattern>
  • <undelete-pattern>
  • <untag-pattern>
  • <search>
  • <search-reverse>

Applies to Index colours:

  • index
  • index_author
  • index_collapsed
  • index_date
  • index_flags
  • index_label
  • index_number
  • index_size
  • index_subject
  • index_tag
  • index_tags

Doesn't affect colours:

  • attach_headers
  • body
  • header
  • status

See: regex_colors_parse_color_list(), regex_colors_parse_status_list(), add_pattern()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment