Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support for tsv files in pretty bat #114

Open
jrom99 opened this issue Apr 4, 2024 · 1 comment
Open

Feature request: support for tsv files in pretty bat #114

jrom99 opened this issue Apr 4, 2024 · 1 comment
Labels
pending closure All requested changes/fixes have been made. prettybat Related to the prettybat script.

Comments

@jrom99
Copy link

jrom99 commented Apr 4, 2024

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" "$@"
}
@eth-p
Copy link
Owner

eth-p commented Jun 1, 2024

I wasn't able to add support in the exact way you described, but basic support for this is implemented in 043d2da.

@eth-p eth-p added prettybat Related to the prettybat script. pending closure All requested changes/fixes have been made. labels Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending closure All requested changes/fixes have been made. prettybat Related to the prettybat script.
Projects
None yet
Development

No branches or pull requests

2 participants