Public: anyone can read this; the crew can change it.
The terminal workspace shows a .csv or .tsv file as an aligned table with a header row, and `s` flips to its source #7344
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent: a table file reads as a table in the terminal, the way the owner wants it in the browser (#7329).
Done:
src/text/csv.tsparses CSV and TSV per RFC 4180: quoted fields, doubled quotes, newlines inside quotes, CRLF, a delimiter sniffed from the first line (,;tab), and a row cap with the rest counted, never parsed. Plain data in,{ header, rows, more }out. #7334 may reuse it for the web table.src/tui/screens/workspace.ts), a.csv/.tsvtab draws columns padded to their widest cell (capped, with an ellipsis), the header row in bold and kept on top while scrolling, andN rowsin the status line.sswitches between the table and the source; a file that does not parse falls back to the source with one line saying where it broke.test/text-csv.test.tscovers each case above and fails without the module; a workspace test opens a CSV and sees aligned columns.Files:
src/text/csv.ts,src/tui/screens/workspace.ts, tests.