components/

directory
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: MIT

Directories

Path Synopsis
Package assets wraps the chroma syntax-highlighting engine to provide bat's asset layer: lexer (syntax) detection by language name, file name and content; theme (style) lookup with bat-compatible theme-name aliases; and the per-line styled-segment output the printer consumes.
Package assets wraps the chroma syntax-highlighting engine to provide bat's asset layer: lexer (syntax) detection by language name, file name and content; theme (style) lookup with bat-compatible theme-name aliases; and the per-line styled-segment output the printer consumes.
Package config ports bat's config module: the central Config struct plus the option enums (paging, wrapping, non-printable notation, binary behavior, strip-ansi, visible lines) and the SyntaxMapping used to override language detection by glob.
Package config ports bat's config module: the central Config struct plus the option enums (paging, wrapping, non-printable notation, binary behavior, strip-ansi, visible lines) and the SyntaxMapping used to override language detection by glob.
Package controller ports bat's controller module: it drives the whole pipeline for each input — open and buffer it, detect the syntax (honoring language overrides, syntax mappings and ignored suffixes), highlight it, gather git changes, then walk the lines emitting headers, snip separators, highlighted content and footers through the printer.
Package controller ports bat's controller module: it drives the whole pipeline for each input — open and buffer it, detect the syntax (honoring language overrides, syntax mappings and ignored suffixes), highlight it, gather git changes, then walk the lines emitting headers, snip separators, highlighted content and footers through the printer.
Package decorations ports bat's decorations module: the gutter elements drawn to the left of each line (line numbers, git change markers, grid border).
Package decorations ports bat's decorations module: the gutter elements drawn to the left of each line (line numbers, git change markers, grid border).
Package gitdiff ports bat's diff module: it computes per-line modifications (added / removed / modified) between a file's working-tree state and the git index, so the printer can draw change markers in the gutter.
Package gitdiff ports bat's diff module: it computes per-line modifications (added / removed / modified) between a file's working-tree state and the git index, so the printer can draw change markers in the gutter.
Package input ports bat's input module: the description of an input source (an ordinary file, standard input, or in-memory bytes), how it is opened for reading, and the display name / size metadata the printer needs for headers.
Package input ports bat's input module: the description of an input source (an ordinary file, standard input, or in-memory bytes), how it is opened for reading, and the display name / size metadata the printer needs for headers.
Package linerange ports bat's line_range module: parsing of "N", "N:M", "N:", ":M", "N:+K", "N:-K", "N::C", "N:M:C" and end-relative ":-K"/"K:" offsets, plus the LineRanges / HighlightedLineRanges containers used to decide which lines are visible or highlighted.
Package linerange ports bat's line_range module: parsing of "N", "N:M", "N:", ":M", "N:+K", "N:-K", "N::C", "N:M:C" and end-relative ":-K"/"K:" offsets, plus the LineRanges / HighlightedLineRanges containers used to decide which lines are visible or highlighted.
Package output ports bat's output module: it decides whether to write to stdout directly or through a pager (less by default), builds the correct less arguments, and exposes a single io.Writer plus Close that waits for the pager to exit.
Package output ports bat's output module: it decides whether to write to stdout directly or through a pager (less by default), builds the correct less arguments, and exposes a single io.Writer plus Close that waits for the pager to exit.
Package printer ports bat's printer module.
Package printer ports bat's printer module.
Package style ports bat's style module: the StyleComponent enum, the StyleComponents set queried by the printer, and the StyleComponentList parser that understands override / "+add" / "-remove" semantics.
Package style ports bat's style module: the StyleComponent enum, the StyleComponents set queried by the printer, and the StyleComponentList parser that understands override / "+add" / "-remove" semantics.
Package terminfo detects terminal properties bat relies on: whether stdout/ stdin are interactive ttys, the terminal width, true-color support and whether color output should be enabled at all.
Package terminfo detects terminal properties bat relies on: whether stdout/ stdin are interactive ttys, the terminal width, true-color support and whether color output should be enabled at all.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL