diff options
author | Wayne Davison <wayne@opencoder.net> | 2021-11-22 17:19:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 20:19:23 -0500 |
commit | 0c0043b428834e9323eaaaf5795d55209fb3dd5a (patch) | |
tree | f18e1ab1e99b513e1b722534767b98f6227e2226 /src/subcommands | |
parent | c2743f513176cf75c0733e4752a3c90000dded1b (diff) |
Navigate regexp (#782)
* Allow navigate-regexp value to be overridden.
* Don't add an empty label to the navigate_regexp.
* Make --hunk-label=str not require --navigate.
* Change navigate regexp to navigate regex.
* Turn navigate-regex into an Option<String>.
Diffstat (limited to 'src/subcommands')
-rw-r--r-- | src/subcommands/show_config.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/subcommands/show_config.rs b/src/subcommands/show_config.rs index 594dca68..cf86d09d 100644 --- a/src/subcommands/show_config.rs +++ b/src/subcommands/show_config.rs @@ -117,7 +117,7 @@ pub fn show_config(config: &config::Config, writer: &mut dyn Write) -> std::io:: max-line-length = {max_line_length} line-fill-method = {line_fill_method} navigate = {navigate} - navigate-regexp = {navigate_regexp} + navigate-regex = {navigate_regex} pager = {pager} paging = {paging_mode} side-by-side = {side_by_side} @@ -132,9 +132,9 @@ pub fn show_config(config: &config::Config, writer: &mut dyn Write) -> std::io:: BgFillMethod::Spaces => "spaces", }, navigate = config.navigate, - navigate_regexp = match &config.navigate_regexp { + navigate_regex = match &config.navigate_regex { None => "".to_string(), - Some(s) => s.to_string(), + Some(s) => format_option_value(s.to_string()), }, pager = config.pager.clone().unwrap_or_else(|| "none".to_string()), paging_mode = match config.paging_mode { |