Merge pull request #1439 from rsteube/themes-help-interactive-only

only print themes hint in interactive mode
This commit is contained in:
Keith Hall 2020-12-19 23:54:41 +02:00 committed by GitHub
commit 2d22c705ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -5,6 +5,8 @@
## Bugfixes
- only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
## Other
## Syntaxes

View File

@ -200,19 +200,19 @@ pub fn list_themes(cfg: &Config) -> Result<()> {
.ok();
writeln!(stdout)?;
}
writeln!(
stdout,
"Further themes can be installed to '{}', \
and are added to the cache with `bat cache --build`. \
For more information, see:\n\n \
https://github.com/sharkdp/bat#adding-new-themes",
config_file().join("themes").to_string_lossy()
)?;
} else {
for theme in assets.themes() {
writeln!(stdout, "{}", theme)?;
}
}
writeln!(
stdout,
"Further themes can be installed to '{}', \
and are added to the cache with `bat cache --build`. \
For more information, see:\n\n \
https://github.com/sharkdp/bat#adding-new-themes",
config_file().join("themes").to_string_lossy()
)?;
Ok(())
}