summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cli.rs2
-rw-r--r--src/options/get.rs13
2 files changed, 6 insertions, 9 deletions
diff --git a/src/cli.rs b/src/cli.rs
index e90c26d7..a771ad53 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -271,7 +271,7 @@ pub struct Opt {
/// Show available delta themes with an example of highlighted diff output.
/// If diff output is supplied on standard input then this will be used for the demo. For
- /// example: `git show --color=always | delta --show-themes`.
+ /// example: `git show | delta --show-themes`.
/// By default, if delta is configured to use a light theme (as set by the user or inferred by the
/// BAT_THEME), only displays light themes, otherwise will only display dark themes, unless the
/// --dark or --light command line arguments are included.
diff --git a/src/options/get.rs b/src/options/get.rs
index a1bbecae..5752283a 100644
--- a/src/options/get.rs
+++ b/src/options/get.rs
@@ -49,14 +49,11 @@ pub fn get_themes(git_config: Option<git_config::GitConfig>) -> Vec<String> {
for e in &git_config.unwrap().config.entries(None).unwrap() {
let entry = e.unwrap();
let entry_name = entry.name().unwrap();
- let entry_value = entry.value().unwrap();
- if entry_value == "true" {
- let caps = GIT_CONFIG_THEME_REGEX.captures(entry_name);
- if let Some(caps) = caps {
- let name = caps.get(1).map_or("", |m| m.as_str()).to_string();
- if !themes.contains(&name) {
- themes.push(name)
- }
+ let caps = GIT_CONFIG_THEME_REGEX.captures(entry_name);
+ if let Some(caps) = caps {
+ let name = caps.get(1).map_or("", |m| m.as_str()).to_string();
+ if !themes.contains(&name) {
+ themes.push(name)
}
}
}