diff options
author | filip <filipbachul@gmail.com> | 2021-08-27 16:38:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 09:38:46 -0500 |
commit | 6b132967419cc497b59617925af73ff0b896076f (patch) | |
tree | 62954072b98a7a3d46022fdafded0e765391d568 /src/configs | |
parent | ce168e3241a6ed20065808eb955b2882d92dacc1 (diff) |
feat(git_metrics): Git metrics show only nonzero diffs (#2887)
* implement only_nonzero_diffs configuration option
* update documetation
Diffstat (limited to 'src/configs')
-rw-r--r-- | src/configs/git_metrics.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/configs/git_metrics.rs b/src/configs/git_metrics.rs index f3e52e200..ed3e499a2 100644 --- a/src/configs/git_metrics.rs +++ b/src/configs/git_metrics.rs @@ -7,6 +7,7 @@ use starship_module_config_derive::ModuleConfig; pub struct GitMetricsConfig<'a> { pub added_style: &'a str, pub deleted_style: &'a str, + pub only_nonzero_diffs: bool, pub format: &'a str, pub disabled: bool, } @@ -16,7 +17,8 @@ impl<'a> Default for GitMetricsConfig<'a> { GitMetricsConfig { added_style: "bold green", deleted_style: "bold red", - format: "[+$added]($added_style) [-$deleted]($deleted_style) ", + only_nonzero_diffs: true, + format: "([+$added]($added_style) )([-$deleted]($deleted_style) )", disabled: true, } } |