mirror of https://github.com/sharkdp/bat.git
Compare commits
1 Commits
778e873162
...
c8c6e4501e
Author | SHA1 | Date |
---|---|---|
Stéphane Blondon | c8c6e4501e |
|
@ -6,7 +6,6 @@
|
|||
- `bat --squeeze-blank`/`bat -s` will now squeeze consecutive empty lines, see #1441 (@eth-p) and #2665 (@einfachIrgendwer0815)
|
||||
- `bat --squeeze-limit` to set the maximum number of empty consecutive when using `--squeeze-blank`, see #1441 (@eth-p) and #2665 (@einfachIrgendwer0815)
|
||||
- `PrettyPrinter::squeeze_empty_lines` to support line squeezing for bat as a library, see #1441 (@eth-p) and #2665 (@einfachIrgendwer0815)
|
||||
- Syntax highlighting for JavaScript files that start with `#!/usr/bin/env bun` #2913 (@sharunkumar)
|
||||
|
||||
## Bugfixes
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
Submodule assets/syntaxes/01_Packages contains modified content
|
||||
diff --git syntaxes/01_Packages/JavaScript/JavaScript.sublime-syntax syntaxes/01_Packages/JavaScript/JavaScript.sublime-syntax
|
||||
index 05a4fed6..78a7bf55 100644
|
||||
--- syntaxes/01_Packages/JavaScript/JavaScript.sublime-syntax
|
||||
+++ syntaxes/01_Packages/JavaScript/JavaScript.sublime-syntax
|
||||
@@ -5,7 +5,7 @@ name: JavaScript
|
||||
file_extensions:
|
||||
- js
|
||||
- htc
|
||||
-first_line_match: ^#!\s*/.*\b(node|js)\b
|
||||
+first_line_match: ^#!\s*/.*\b(node|bun|js)\b
|
||||
scope: source.js
|
||||
variables:
|
||||
bin_digit: '[01_]'
|
|
@ -201,13 +201,13 @@ pub fn list_themes(cfg: &Config, config_dir: &Path, cache_dir: &Path) -> Result<
|
|||
let mut stdout = stdout.lock();
|
||||
|
||||
let default_theme = HighlightingAssets::default_theme();
|
||||
for theme in assets.themes() {
|
||||
let default_theme_info = if default_theme == theme {
|
||||
" (default)"
|
||||
} else {
|
||||
""
|
||||
};
|
||||
if config.colored_output {
|
||||
if config.colored_output {
|
||||
for theme in assets.themes() {
|
||||
let default_theme_info = if default_theme == theme {
|
||||
" (default)"
|
||||
} else {
|
||||
""
|
||||
};
|
||||
writeln!(
|
||||
stdout,
|
||||
"Theme: {}{}\n",
|
||||
|
@ -219,12 +219,7 @@ pub fn list_themes(cfg: &Config, config_dir: &Path, cache_dir: &Path) -> Result<
|
|||
.run(vec![theme_preview_file()], None)
|
||||
.ok();
|
||||
writeln!(stdout)?;
|
||||
} else {
|
||||
writeln!(stdout, "{theme}{default_theme_info}")?;
|
||||
}
|
||||
}
|
||||
|
||||
if config.colored_output {
|
||||
writeln!(
|
||||
stdout,
|
||||
"Further themes can be installed to '{}', \
|
||||
|
@ -233,6 +228,15 @@ pub fn list_themes(cfg: &Config, config_dir: &Path, cache_dir: &Path) -> Result<
|
|||
https://github.com/sharkdp/bat#adding-new-themes",
|
||||
config_dir.join("themes").to_string_lossy()
|
||||
)?;
|
||||
} else {
|
||||
for theme in assets.themes() {
|
||||
let default_theme_info = if default_theme == theme {
|
||||
" (default)"
|
||||
} else {
|
||||
""
|
||||
};
|
||||
writeln!(stdout, "{theme}{default_theme_info}")?;
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in New Issue