on master help sign in
only print themes hint in interactive mode
commit84b070239951a1fff778812393b670cc5c06244d authorrsteube <rsteube@users.noreply.github.com> dateWed 16 Dec 2020, 20:41 (6 years ago) parentf3489ff
2 files changed+10−8
CHANGELOG.md+2 src/bin/bat/main.rs+8−8
CHANGELOG.md+2
@@ -5,6 +5,8 @@
55
66## Bugfixes
77
8+- only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
9+
810## Other
911
1012## Syntaxes
src/bin/bat/main.rs+8−8
@@ -200,19 +200,19 @@ pub fn list_themes(cfg: &Config) -> Result<()> {
200200 .ok();
201201 writeln!(stdout)?;
202202 }
203+ writeln!(
204+ stdout,
205+ "Further themes can be installed to '{}', \
206+ and are added to the cache with `bat cache --build`. \
207+ For more information, see:\n\n \
208+ https://github.com/sharkdp/bat#adding-new-themes",
209+ config_file().join("themes").to_string_lossy()
210+ )?;
203211 } else {
204212 for theme in assets.themes() {
205213 writeln!(stdout, "{}", theme)?;
206214 }
207215 }
208− writeln!(
209− stdout,
210− "Further themes can be installed to '{}', \
211− and are added to the cache with `bat cache --build`. \
212− For more information, see:\n\n \
213− https://github.com/sharkdp/bat#adding-new-themes",
214− config_file().join("themes").to_string_lossy()
215− )?;
216216
217217 Ok(())
218218}