When the -n/--number flag is passed on the command line, bat now shows
line numbers even when piping output to another process (loop-through
mode), similar to how `cat -n` behaves.
This change detects if -n or --number was passed on the CLI (before
merging with config file and environment variables) and disables
loop-through mode in that case, allowing the InteractivePrinter to
add line numbers.
The existing behavior is preserved:
- Styles from config/env are still ignored when piping (unless --decorations=always is set)
- Only the -n flag from CLI enables line numbers in piped mode
- -p and --style options from CLI do not disable loop-through mode
- Added TypeScript/ts language support to Markdown.sublime-syntax.patch
- Code blocks with ```typescript or ```ts will now use TypeScript syntax highlighting
- Updated patch hunk headers to reflect added lines
* feat(cargo): add vendored-libgit2 feature
this is done to resolve the issues when the host system doesn't have
`libgit2` installed or if its incompatible with the version we expect
see: sharkdp/bat/issues/2939
* docs(changelog): add vendored libgit2 entry
Previously, setting `--style=changes` would always print a 2-space
indent, even if the file was unmodified. This changes the style to only
print an indent if there is at least one +/- git marker in the sidebar.
to determine the end of the line, instead of reading until \n (0x0A) and then reading until 0x00 and calling it done, read until we find 0x00 preceded by 0x0A.
docs(CHANGELOG.md): 📚 add entry for context in line ranges and normalize list formatting
style(src/line_range.rs): 🎨 trim trailing whitespace in context parsing code