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

shipped production is serving it opened this has it
opened this

Intent: a table file reads as a table in the terminal, the way the owner wants it in the browser (#7329).

Done:

  • [ ] A new src/text/csv.ts parses 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.
  • [ ] In the workspace (src/tui/screens/workspace.ts), a .csv/.tsv tab draws columns padded to their widest cell (capped, with an ellipsis), the header row in bold and kept on top while scrolling, and N rows in the status line.
  • [ ] s switches between the table and the source; a file that does not parse falls back to the source with one line saying where it broke.
  • [ ] Tests: test/text-csv.test.ts covers 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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs