From 62ca45953f5254a1b434725799d6e10ca63577fa Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sun, 26 Dec 2021 22:01:24 -0500 Subject: [PATCH] blame-separator and blame-separator-style options --- src/cli.rs | 11 ++++++++++- src/config.rs | 8 ++++++-- src/handlers/blame.rs | 4 +++- src/options/set.rs | 2 ++ src/parse_styles.rs | 28 ++++++++++++++++++++++++++++ 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 5165f3cd..569be55f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -491,10 +491,19 @@ pub struct Opt { /// "{timestamp}", "{author}", and "{commit}". #[structopt( long = "blame-format", - default_value = "{timestamp:<15} {author:<15.14} {commit:<8} │" + default_value = "{timestamp:<15} {author:<15.14} {commit:<8}" )] pub blame_format: String, + /// Separator between the commit metadata and code sections of a line of git blame output. + #[structopt(long = "blame-separator", default_value = "│")] + pub blame_separator: String, + + #[structopt(long = "blame-separator-style")] + /// Style (foreground, background, attributes) for the separator between the commit metadata and + /// code sections of a line of `git blame` output. + pub blame_separator_style: Option, + #[structopt(long = "blame-code-style")] /// Style (foreground, background, attributes) for the code section of a line of `git blame` /// output. By default the code will be syntax-highlighted with the same background color as the diff --git a/src/config.rs b/src/config.rs index e8d991e4..be944cf2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -63,6 +63,8 @@ pub struct Config { pub blame_code_style: Option