1
1
mirror of https://github.com/wez/wezterm.git synced 2024-08-16 09:40:34 +03:00

Update quick_select_patterns.md to include info about capturing groups

closes: https://github.com/wez/wezterm/pull/5082
This commit is contained in:
Przemek Pawlas 2024-07-13 12:00:26 -07:00 committed by Wez Furlong
parent ad11815e87
commit 749ddc9ffe
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -17,6 +17,12 @@ config.quick_select_patterns = {
}
```
!!! note
If you want to use capture groups in your patterns, you must use
non-capturing groups `(?:)` for them to work as you intend, as
the overall list of `quick_select_patterns` is compiled into a larger
alternation regex that itself uses capture groups.
{{since('20230408-112425-69ae8472', outline=True)}}
The regex syntax now supports backreferences and look around assertions.
See [Fancy Regex Syntax](https://docs.rs/fancy-regex/latest/fancy_regex/#syntax)