1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-30 18:11:44 +00:00
Commit Graph

138 Commits

Author SHA1 Message Date
Keith Hall 12ee94f530 Merge branch 'master' into list-themes-term-probe-fix 2026-04-30 14:13:47 +03:00
Ish West c3df0e6a88 Fixed a bug with hardcoded terminal probing when --list-themes is called 2026-04-25 17:37:36 +02:00
curious-rabbit 71c894e843 santize filenames 2026-04-20 14:25:49 +02:00
Asish Kumar a9137fab05 Support BAT_WIDTH as an alias for --terminal-width
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
2026-04-12 01:12:55 +05:30
Keith Hall 3e4169b8c3 cargo fmt 2026-03-31 22:35:21 +03:00
Keith Hall ba223289ce Update --diagnostic output with detected terminal color scheme type 2026-03-31 22:23:10 +03:00
Keith Hall abab6533e4 Update --diagnostic output with BAT_THEME_LIGHT/DARK env vars 2026-03-31 22:22:31 +03:00
abhinavcool42 8b09724420 change imports 2025-11-02 11:55:30 +05:30
abhinavcool42 2af7be1b65 fix prefix 2025-11-02 11:51:00 +05:30
abhinavcool42 9456f7d8cd list-themes buffer added 2025-11-02 11:31:07 +05:30
abhinavcool42 1852dea96a Fix --list-themes pager init so less stays interactive 2025-10-30 18:42:35 +05:30
Daniel Waechter a470cebf32 Add a "builtin" pager using the Minus crate 2025-09-09 16:15:54 -04:00
Yuri Astrakhan d9fbd18541 inline format arguments
In a few cases, removed the unneeded `&` - this causes a minor slowdown because compiler cannot eliminate those (yet).
2025-08-19 05:07:54 +02:00
einfachIrgendwer0815 12a2a451b4 Add paging to --list-themes 2025-04-02 11:27:37 +02:00
einfachIrgendwer0815 4f161705a3 Fix: Don't output default theme info to piped stdout 2025-01-27 17:11:26 +01:00
einfachIrgendwer0815 dbe25ba5e6 Include shell completions in the executable 2024-12-01 09:39:17 +01:00
Keith Hall 60693db73f Merge branch 'master' into dark-light 2024-11-13 20:33:37 +02:00
Tau Gärtli 16d9b99f6c Flatten preference enum 2024-09-04 21:18:29 +02:00
einfachIrgendwer0815 0603f0b844 Don't output default theme info to piped stdout 2024-08-25 10:54:46 +02:00
Tau Gärtli bc42149a72 Merge color scheme options into theme / BAT_THEME 2024-08-18 14:59:14 +02:00
Tau Gärtli b9b981f657 Generalize --detect-color-scheme to --color-scheme 2024-08-16 14:14:30 +02:00
Tau Gärtli 5c6974703e Respect --detect-color-scheme flag when listing themes 2024-08-16 14:13:58 +02:00
Tau Gärtli 1b0a6da4be Use new default_theme fn for --list-themes 2024-08-16 14:13:58 +02:00
Stéphane Blondon bb4d1cbd2e refactor: factorize constants by inverting loop and condition order 2024-04-19 11:44:47 +02:00
Stéphane Blondon 23ec433167 display which theme is the default one in basic output 2024-04-19 11:44:47 +02:00
sblondon d5bd4aa93f display which theme is the default one in colored output (#2838) 2024-04-14 15:54:52 +02:00
Rivera Calzadillas f8c5429a6c Print $TERM with --diagnostic 2024-04-07 14:24:16 +02:00
Rivera Calzadillas f71226adbb Sort env vars printed by --diagnostic 2024-04-07 14:24:16 +02:00
Lena 4c85483486 Inline format! args wherever possible 2024-02-25 00:38:11 +01:00
Oliver Looney c3f2ddf509 Merge branch 'master' into 2783-setting-terminal-title 2024-02-11 22:53:48 +00:00
Oliver looney 02077db53e undid unnecessary api visibility changes 2024-02-08 21:41:20 +00:00
Oliver looney b33e33fe26 terminal title is only set if user opts in with --set_terminal_title flag 2024-01-27 14:17:25 +00:00
Oliver looney 3b0ade9cb8 slightly changed set terminal command to match docs & broke print line into multiple variables 2023-12-31 22:24:44 +00:00
Oliver looney 57016f4e04 small refactoring of set terminal title function 2023-12-31 22:15:00 +00:00
Oliver looney 12b74dfb4e terminal title is only set when pager is being used 2023-12-18 16:59:12 +00:00
cyqsimon f483d2df42 Lazily compile GlobMatchers 2023-12-11 10:21:05 +08:00
cyqsimon cfd622d6e1 Migrate SyntaxMapping impl to new system
Most existing builtins are removed but not yet ported, so the test
`user_can_override_builtin_mappings` should fail. It should pass once the old
rules have been ported.
2023-12-11 10:21:05 +08:00
Oliver looney 069318b139 fixed formatting of terminal title 2023-12-10 17:20:42 +00:00
Oliver looney b9b554248d successfully setting the terminal title to bat's input's names 2023-12-10 17:17:19 +00:00
Peter Hebden d929becefc Fix signatures 2023-09-01 20:52:55 +02:00
einfachIrgendwer0815 26111950b3 Add environment variable BAT_PAGING 2023-09-01 17:59:41 +02:00
Constantin Nickel da3aa4e2fd Use nu-ansi-term instead of ansi_term
The `nu-ansi-term` crate is a fork of `ansi_term` which is maintained by
the Nushell project.
2023-03-24 17:42:54 +01:00
Miles Liu e39178b101 Fix bat cache --clear not clearing the --target dir if specified 2022-11-19 18:00:37 +08:00
Martin Nordholts 2dd2994b2f Merge remote-tracking branch 'origin/master' into feature/668/add-systemwide-config 2022-09-04 20:44:23 +02:00
David Peter 48541b8507 Fix clippy suggestions
Leads to a performance improvement for `bat -A`:

    | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
    |:---|---:|---:|---:|---:|
    | `./bat-master --no-config -A ./bat-master` | 259.8 ± 1.1 | 258.4 | 261.7 | 1.15 ± 0.01 |
    | `./bat-2301 --no-config -A ./bat-master` | 225.6 ± 1.8 | 224.0 | 229.5 | 1.00 |
2022-09-04 14:28:44 +02:00
Ed Page 3d398b35c3 refactor: Switch from is_present to actions
Because "diff" is conditionally present, we need to check for it to
avoid some of clap's stricter checks meant to prevent bugs.
2022-09-03 14:01:56 +02:00
Ed Page 6099f2c146 refactor: Move off of value_of 2022-09-03 14:01:56 +02:00
Ed Page 2323804f7e refactor: Port to clap3
Ths does remove the specialization of version's description.  The way
this is done (internally through `mut_arg`) doesn't play well with
subcommands.  Clap tries to force this version of `version` into the
subcommand despite not being needed.  Clap v4 dramatically changes how
version customization works.

clap also does more error checks now to prevent programmer mistake, so
we can't have a conflict with an argument that is conditionally there,
so I swapped the condition.
2022-09-03 14:01:56 +02:00
Martin Nordholts 520081a92c Print info about custom assets in --diagnostics 2022-04-02 21:46:41 +02:00
Patrick Pichler 5ed64444e3 Add systemwide config file support
There is now support for a systemwide config file. The location of the
system wide config file is `$(BAT_SYSTEM_CONFIG_PREFIX)/bat/config`.
`$(BAT_SYSTEM_CONFIG_PREFIX)` has to be provided at compile time as an
environment variable. If the environment variable is not set, a default
is used. This default is `C:\ProgramData` for windows and `/etc` for
every other os.
2022-03-10 20:55:11 +01:00