Linux command
tv 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
View a CSV file
tv [data.csv]
View a TSV file
tv -t [data.tsv]
View with a custom delimiter
tv -d ";" [data.txt]
Show only the first N rows
tv -n [10] [data.csv]
View without a header row
tv --no-header [data.csv]
Use a specific color palette
tv -c [1] [data.csv]
Pipe data from another command
cat [data.csv] | tv
说明
tv (tidy-viewer) is a terminal viewer for tabular data that displays CSV, TSV, and other delimited files as formatted, column-aligned tables. It reads from files or stdin and renders data with proper alignment for easy reading in the terminal. Custom delimiters can be specified for non-standard formats, and the --no-header flag handles files without a header row. The tool supports limiting output to a specified number of rows (default 25) for previewing large datasets. Missing values (NA, NULL, empty) are detected and highlighted. Output is optimized for terminal display, with configurable column widths and 5 built-in color palettes. A dotfile (~/.tv.toml) can be used for persistent configuration.
参数
- -t
- Tab-separated.
- -d _DELIM_
- Custom delimiter.
- --no-header
- No header row.
- -n _NUM_
- Number of rows to output. Default: 25.
- -c _N_
- Color palette: 1 (nord), 2 (one_dark), 3 (gruvbox), 4 (dracula), 5 (uncolor).
- -u _WIDTH_
- Upper (maximum) column width. Default: 20.
- -l _WIDTH_
- Lower (minimum) column width. Must be 2 or larger. Default: 2.
- -h, --help
- Show help.
FAQ
What is the tv command used for?
tv (tidy-viewer) is a terminal viewer for tabular data that displays CSV, TSV, and other delimited files as formatted, column-aligned tables. It reads from files or stdin and renders data with proper alignment for easy reading in the terminal. Custom delimiters can be specified for non-standard formats, and the --no-header flag handles files without a header row. The tool supports limiting output to a specified number of rows (default 25) for previewing large datasets. Missing values (NA, NULL, empty) are detected and highlighted. Output is optimized for terminal display, with configurable column widths and 5 built-in color palettes. A dotfile (~/.tv.toml) can be used for persistent configuration.
How do I run a basic tv example?
Run `tv [data.csv]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -t do in tv?
Tab-separated.