diff --git a/CHANGELOG.md b/CHANGELOG.md index 05540511..dc655216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs index eb6f75bc..cb50a84f 100644 --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -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(()) } diff --git a/tests/syntax-tests/regression_test.sh b/tests/syntax-tests/regression_test.sh index 25acb256..45e2e3ea 100755 --- a/tests/syntax-tests/regression_test.sh +++ b/tests/syntax-tests/regression_test.sh @@ -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"