mirror of
https://github.com/sharkdp/bat
synced 2024-11-22 20:03:06 +00:00
only print themes hint in interactive mode
This commit is contained in:
parent
f3489ffa29
commit
84b0702399
2 changed files with 10 additions and 8 deletions
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
## Bugfixes
|
## Bugfixes
|
||||||
|
|
||||||
|
- only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
|
||||||
|
|
||||||
## Other
|
## Other
|
||||||
|
|
||||||
## Syntaxes
|
## Syntaxes
|
||||||
|
|
|
@ -200,19 +200,19 @@ pub fn list_themes(cfg: &Config) -> Result<()> {
|
||||||
.ok();
|
.ok();
|
||||||
writeln!(stdout)?;
|
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 {
|
} else {
|
||||||
for theme in assets.themes() {
|
for theme in assets.themes() {
|
||||||
writeln!(stdout, "{}", theme)?;
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue