on master help sign in
Merge branch 'master' into fix-1438-newline-can-be-added-even-if-style-plain
commit73c16574e6705a7ddbfa0438d938eab485ee3d75 authorDavid Peter <sharkdp@users.noreply.github.com> dateMon 21 Dec 2020, 08:22 (6 years ago) parent68d525c60e00d4
3 files changed+11−9
CHANGELOG.md+2 src/bin/bat/main.rs+8−8 tests/syntax-tests/regression_test.sh+1−1
CHANGELOG.md+2
@@ -6,6 +6,8 @@
66## Bugfixes
77
88- If the last line doesn't end with a newline character, don't add it if `--style=plain`, see #1438 (@Enselic)
9+- Only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
10+- Make ./tests/syntax-tests/regression_test.sh work on recent versions of macOS, see #1443 (@Enselic)
911
1012## Other
1113
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}
tests/syntax-tests/regression_test.sh+1−1
@@ -4,7 +4,7 @@ set -eou pipefail
44
55script_directory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
66
7−output_directory=$(mktemp -d --suffix=.bat-syntax-regression-test)
7+output_directory=$(mktemp -d)
88
99"$script_directory"/create_highlighted_versions.py --output="$output_directory"
1010