1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-02-21 04:18:47 +00:00

4 Commits

Author SHA1 Message Date
Keith Hall
512bfde7ce Correctly handle CSV files with a single separator throughout
better auto-detection of CSV delimiter
- files with a tsv extension are automatically detected as tab delimited
- other files parsed as CSV go through the following steps:
  - if the first line contains at least 3 of the same separator, it uses that separator as a delimiter
  - if the first line contains only one supported separator character, it uses that separator as a delimiter
  - otherwise it falls back to treating all supported delimiters as the delimiter

 supported delimiters, in precedence order:
 - comma `,`
 - semi-colon `;`
 - tab `\t`
 - pipe `|`
2025-02-09 20:37:53 +02:00
Keith Hall
848ceb6f10 Remove variable.other from CSV highlighting 2021-05-11 21:04:02 +02:00
Keith Hall
3559079de0 Improvements to CSV highlighting 2021-05-11 21:04:02 +02:00
Thiago Arrais
aa205c6a9f Add CSV syntax hightlighting test 2020-10-06 19:47:33 +02:00