Files
LLeMbas-TTY/docs/config/lua/config/quick_select_patterns.md
T
Wez Furlong 7b40f01054 switch to fancy-regex crate
Enables back references and look around assertions for quick select
and hyper link rules

refs: https://github.com/wez/wezterm/issues/3247
2023-04-07 17:39:00 -07:00

1012 B

quick_select_patterns

{{since('20210502-130208-bff6815d')}}

Specify additional patterns to match when in quick select mode. This setting is a table listing out a set of regular expressions.

config.quick_select_patterns = {
  -- match things that look like sha1 hashes
  -- (this is actually one of the default patterns)
  '[0-9a-f]{7,40}',
}

{{since('nightly', outline=True)}} The regex syntax now supports backreferences and look around assertions. See Fancy Regex Syntax for the extended syntax, which builds atop the underlying Regex syntax. In prior versions, only the base Regex syntax was supported.

This example matches the string `"bar"`, but only when not part of the string
`"foo:bar"`:

```lua
config.quick_select_patterns = {
    "(?<!foo:)bar"
}
```