bat-extras
bat-extras copied to clipboard
Feature request: support for tsv files in pretty bat
For TSV files, the default bat behavior doesn't take data length into account to define header width.
I'd like to propose using column to format such files, like the following function:
# optionally have "--wrap never" for wider files
function() {
file="$1"
shift
column --keep-empty-lines --table -s $'\t' -o $'\t' "$file" | bat -l tsv --tabs 0 --file-name "$file" "$@"
}
I wasn't able to add support in the exact way you described, but basic support for this is implemented in 043d2da9645fa1a625e85a1f68f43adbffe219c7.