Merge branch 'master' into fix-1438-newline-can-be-added-even-if-style-plain

This commit is contained in:
David Peter 2020-12-21 08:22:01 +01:00 committed by GitHub
commit 73c16574e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 9 deletions

View File

@ -6,6 +6,8 @@
## Bugfixes
- If the last line doesn't end with a newline character, don't add it if `--style=plain`, see #1438 (@Enselic)
- Only print themes hint in interactive mode (`bat --list-themes`), see #1439 (@rsteube)
- Make ./tests/syntax-tests/regression_test.sh work on recent versions of macOS, see #1443 (@Enselic)
## Other

View File

@ -200,11 +200,6 @@ pub fn list_themes(cfg: &Config) -> Result<()> {
.ok();
writeln!(stdout)?;
}
} else {
for theme in assets.themes() {
writeln!(stdout, "{}", theme)?;
}
}
writeln!(
stdout,
"Further themes can be installed to '{}', \
@ -213,6 +208,11 @@ pub fn list_themes(cfg: &Config) -> Result<()> {
https://github.com/sharkdp/bat#adding-new-themes",
config_file().join("themes").to_string_lossy()
)?;
} else {
for theme in assets.themes() {
writeln!(stdout, "{}", theme)?;
}
}
Ok(())
}

View File

@ -4,7 +4,7 @@ set -eou pipefail
script_directory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
output_directory=$(mktemp -d --suffix=.bat-syntax-regression-test)
output_directory=$(mktemp -d)
"$script_directory"/create_highlighted_versions.py --output="$output_directory"