diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2023-11-12 20:50:48 +0100 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2023-11-13 23:42:39 +0100 |
| commit | 118459db592ed2137e3f0cdde46933859baf9cf2 (patch) | |
| tree | c96b775783fcd320ac0de16375dea4723ace8e62 /src/regex.hh | |
| parent | ed1e2f2e081b8391da8ecaa0c0481e693443058b (diff) | |
Quote completions of regex options
Recent changes to `make_error_pattern` added a space to the default
value. This means that
set g make_error_pattern <tab>
now produces an invalid command because regexes are not quoted. We do
quote strings; regexes are not all that different so quote them too.
Diffstat (limited to 'src/regex.hh')
| -rw-r--r-- | src/regex.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/regex.hh b/src/regex.hh index a4d3d769..c0f3970e 100644 --- a/src/regex.hh +++ b/src/regex.hh @@ -162,7 +162,8 @@ bool backward_regex_search(It begin, It end, It subject_begin, It subject_end, return regex_search<It, RegexMode::Backward>(begin, end, subject_begin, subject_end, res, re, flags, idle_func); } -String option_to_string(const Regex& re); +enum class Quoting; +String option_to_string(const Regex& re, Quoting quoting); Regex option_from_string(Meta::Type<Regex>, StringView str); template<typename Iterator, RegexMode mode = RegexMode::Forward, |
