mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-14 10:15:43 +02:00
Merge branch 'master' into syntax-vhdl
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
- Make highlight tests fail when new syntaxes don't have fixtures PR #3255 (@dan-hipschman)
|
||||
- Fix crash for multibyte characters in file path, see issue #3230 and PR #3245 (@HSM95)
|
||||
- Add missing mappings for various bash/zsh files, see PR #3262 (@AdamGaskins)
|
||||
- Send all bat errors to stderr by default, see #3336 (@JerryImMouse)
|
||||
|
||||
## Other
|
||||
|
||||
@ -38,6 +39,7 @@
|
||||
- Add syntax Typst #3300 (@cskeeters)
|
||||
- Map `.mill` files to Scala syntax for Mill build tool configuration files #3311 (@krikera)
|
||||
- Add syntax highlighting for VHDL, see #3337 (@JerryImMouse)
|
||||
- Add syntax mapping for certbot certificate configuration #3338 (@cyqsimon)
|
||||
|
||||
## Themes
|
||||
|
||||
|
@ -67,7 +67,13 @@ pub fn default_error_handler(error: &Error, output: &mut dyn Write) {
|
||||
.ok();
|
||||
}
|
||||
_ => {
|
||||
writeln!(output, "{}: {}", Red.paint("[bat error]"), error).ok();
|
||||
writeln!(
|
||||
&mut std::io::stderr().lock(),
|
||||
"{}: {}",
|
||||
Red.paint("[bat error]"),
|
||||
error
|
||||
)
|
||||
.ok();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
3
src/syntax_mapping/builtins/unix-family/50-certbot.toml
Normal file
3
src/syntax_mapping/builtins/unix-family/50-certbot.toml
Normal file
@ -0,0 +1,3 @@
|
||||
# See https://eff-certbot.readthedocs.io/en/stable/using.html#configuration-file
|
||||
[mappings]
|
||||
"INI" = ["/etc/letsencrypt/renewal/*.conf"]
|
@ -450,6 +450,16 @@ fn stdin_to_stdout_cycle() -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn bat_error_to_stderr() {
|
||||
bat()
|
||||
.arg("/tmp")
|
||||
.assert()
|
||||
.failure()
|
||||
.stderr(predicate::str::contains("[bat error]"));
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn no_args_doesnt_break() {
|
||||
|
Reference in New Issue
Block a user