Co-Authored-By: Claude <noreply@anthropic.com>
- commit
- c7a33bd5e0b1c14cc28681f698056508430fe77c
- parent
- d60c9a60e4a12d6c562f056fe29da2038cf61cbf
- author
- Dami <dami.etoile@gmail.com>
- kind
- docs risk score 0.0 of 3, Jev's estimate
| M | ROADMAP.md | 2 | +- |
| M | docs/ | 2 | +- |
| M | docs/ | 2 | +- |
| M | docs/ | 74 | ++++++++++++++++++++++++++---- |
| M | docs/ | 21 | ++++++-- |
@@ -34,7 +34,6 @@ completed by nu as they're written.
3434 3535 | Item | Result | Size |3636 |---|---|---|37-| Outputs drawn as 012's own grid rather than text: column widths and number formats by type, the active cell and selection, sort, filter and find in place, copy a range, freeze the header, a chart or pivot from the output, and formulas beside it when sent to a sheet | An output works like the data it is | M |3837 | A command's signature and description for the word at the caret, on the context line, through `nu --ide-hover` or `nu --lsp` | Writing a cell without leaving for `help` | S |3938 4039 ### 3. Toward multiplayer@@ -150,6 +149,7 @@ stream above rather than a design of their own.
150149 - The `sheet` command: a nushell module shipped in the binary (`012 nu --install-module`), so nu calls 012 without `^012` or NUON on either side: [Pipelines](docs/nushell/pipelines.md#the-sheet-command)151150 - Notebook tabs, a TUI Jupyter for nushell: code and note cells with Jupyter's keys, outputs drawn in place and opened full-screen, `$name` between cells, stale marks and a reactive mode, outputs sent to sheets as live regions (`nu.name`), saved up to a cap, and earlier notebook sheets converted on open: [Notebooks](docs/nushell/notebooks.md)152151 - Code cells highlighted, checked and completed as they're written by nu itself (`--ide-ast`, `--ide-check`, `--ide-complete`), in the background, falling back to 012's own when nu is missing, old, slow or not trusted: [Notebooks](docs/nushell/notebooks.md#writing-a-cell)152+- Table and record outputs drawn and worked as 012's own grid: formats by type, fitted and resizable columns, select, copy, sort, filter and find in place, full-screen, charts and pivots on the sheet the output is sent to: [Notebooks](docs/nushell/notebooks.md#outputs-as-grids)153153 154154 **Files**155155 @@ -99,7 +99,7 @@ there.
9999 | Entries failing validation | A dotted underline, and `Invalid:` with the rule on the context line |100100 | Values an array spilled | Italic, and `Spilled from B2` on the context line |101101 | Linked files' rows, following, paused or failing | Italic; `●`, `‖` or `!` beside the tab's name and on the context line, with the state in words (`Following`, `Paused`, the error) |102-| A notebook's cells and outputs | `❯` before the tab's name; `▌` left of the active cell and `▎` left of the others selected; a heavy box around the cell being edited; the prompt's and the box's words for its state (`[*]:` and `running`, `waiting`, `failed`, `stale`); `■` for `▶` while it runs; `output hidden` for a hidden output, and which rows show for one scrolled; `×` before an error; an output table's header bold and underlined; an output sent to a sheet in italic, with `Output of files` on the context line; a problem nu finds in the cell being written curly-underlined, in words on the context line with the caret on it |102+| A notebook's cells and outputs | `❯` before the tab's name; `▌` left of the active cell and `▎` left of the others selected; a heavy box around the cell being edited; the prompt's and the box's words for its state (`[*]:` and `running`, `waiting`, `failed`, `stale`); `■` for `▶` while it runs; `output hidden` for a hidden output, and which rows show for one scrolled; `×` before an error; an output's grid entered by `OUTPUT` and a green bar, its pointer and selection in reverse video as on a sheet; an output sent to a sheet in italic, with `Output of files` on the context line; a problem nu finds in the cell being written curly-underlined, in words on the context line with the caret on it |103103 | A table's header row | Bold and underlined, when the table styles its header; `Table Sales, column Amount` on the context line |104104 | Pivot table results | Their headings (`SUM of Units`, `Grand Total`), and a note in words when an edit is refused |105105 | Protected ranges | A question in words before an edit (`A1:B2 is protected.`) |@@ -89,7 +89,7 @@ http get https://api.github.com/repos/nushell/nushell/issues | select number tit
8989 Sort by comments, filter by author, or make a pivot table of issues by9090 author, in the sheet. In a notebook, the same pipeline without9191 `| sheet view` is a cell that fetches the list again each time it runs;92-Enter on its output opens it full-screen to sort and filter, and92+Enter on its output works in it as a grid, to sort, filter and chart, and9393 `nu-timeout` stops a request that hangs.9494 9595 Nushell: [`http get`](https://www.nushell.sh/commands/docs/http_get.html),@@ -50,9 +50,9 @@ runs it at the right, its output under it, and note cells drawn as text:
5050 ▌ [2]: │ big = $files | where size > 1kb │ ▶5151 ▌ │ | sort-by size --reverse │5252 ▌ ╰────────────────────────────────────────────────────────────╯53-▌ Out[2]: name size54-▌ README.md 9.8 kB55-▌ 012 4.2 kB53+▌ Out[2]: name size54+▌ 1 README.md 9.8 kB55+▌ 2 012 4.2 kB5656 ```5757 5858 The prompt says how many runs came before this one (`[2]:`, `[*]:` while@@ -87,8 +87,8 @@ Outputs are drawn by what they are, with values formatted as cells
8787 8888 | Output | Shows |8989 |---|---|90-| A table (a list of records) | Its columns fitted to their values, numbers right-aligned, under its header |91-| A record | Its fields, one a line: `key value` |90+| A table (a list of records) | 012's grid ([Outputs as grids](#outputs-as-grids)): its columns headed by their names and fitted to their values, its rows numbered from 1 |91+| A record | The same grid of two columns, `field` and `value`, a field a row |9292 | A list | Its items, numbered from 0, as nushell numbers them |9393 | Text | Its lines, wrapped |9494 | A value | As a cell shows it: `4.2 kB`, `9/27/2026 11:27:31` |@@ -116,11 +116,63 @@ stateDiagram-v2
116116 hidden --> window: o117117 ```118118 119-**Enter** on an output, or a double click, opens it full-screen: arrows120-(or `h` `j` `k` `l`) move, `s` sorts by the pointer's column and `S` in121-descending order (again for the output's own order), `/` keeps the rows122-holding what's typed, and Esc (or `◀ Back`) goes back. The output itself123-doesn't change.119+**Enter** on any other output, or a double click, opens it full-screen,120+its lines scrolled with the arrows; Esc (or `◀ Back`) goes back.121+122+### Outputs as grids123+124+A table or a record is drawn as 012's own grid, the one a sheet has:125+the values are the cells [sending it to a sheet](#send-to-a-sheet)126+makes, each in the format of its type (sizes as `4.2 kB`, durations,127+dates), right-aligned numbers, fitted columns and the grid's row128+numbers, with the table's column names where a sheet has letters.129+130+**Enter** on the output, or a click in it, works in it (the mode131+indicator says `OUTPUT`, and the bar left of it turns green, as for a132+cell edited): an active cell moves with the arrows, and the grid's keys,133+menus and mouse work on it as on a sheet, in its window:134+135+- Shift+arrows, Ctrl+A or a drag select a range, and the status line136+ shows its Sum, Avg and Count; Ctrl+C copies it, as TSV to the system137+ clipboard and with its formats for Ctrl+V on a sheet.138+- **Data > Sort sheet** (or the column's right-click menu) sorts by the139+ active column, **Data > Create a filter** puts `▾` on each column's140+ name, and Alt+Down (or a click on `▾`) opens the column's filter;141+ Ctrl+F finds.142+- Drag the right edge of a column's name, or **Format > Column width**,143+ to resize it; Shift+wheel scrolls a wide table sideways; the names144+ stay on top as the rows scroll.145+- Ctrl+Z undoes a sort, a filter or a width; typing, Del, paste and146+ formats are refused, as they'd change the output: `G` sends it to a147+ sheet, where its copy can change.148+- **Enter** shows the grid full-screen, where it all works the same;149+ **Esc** deselects, then goes back from full-screen, then back to the150+ notebook.151+152+```mermaid153+stateDiagram-v2154+ selected: output selected (NOTEBOOK)155+ window: its grid, in its window (OUTPUT)156+ full: its grid, full-screen (OUTPUT)157+ selected --> window: Enter, a click in it158+ window --> full: Enter, a double click159+ full --> window: Esc160+ window --> selected: Esc161+```162+163+Sorting and filtering act on the grid's copy: the output, what later164+cells read as `$name`, doesn't change, and running the cell again165+draws its new output afresh.166+167+**Insert > Chart**, **Data > Pivot table** and the frequency table168+(Alt+Shift+F) on the grid make them where charts and pivot tables live,169+on a sheet: the output is [sent to a sheet](#send-to-a-sheet) first (a new170+one named after the cell, unless it's on one already), and the command171+runs there on the columns selected in the grid, every row under the172+header. A chart drawn under the output would have to squeeze into the173+notebook's column and scroll with the cells; on the sheet it has room,174+its editor, images where the terminal draws them, and it follows the175+cell's next run, as the region it charts does.124176 125177 Note cells are Markdown: headings, **bold**, *italic*, `code`, links (the126178 terminal opens them), lists and quotes. They're drawn as text, without a@@ -154,7 +206,7 @@ delete, copy, cut, move, make notes or code, hide or clear outputs.
154206 | Up, Down, `j`, `k` | Move between cells, stopping at each output; on an output, scroll its window first |155207 | Shift+Up, Shift+Down, `K`, `J` | Select the cells passed over too |156208 | Home, End, PgUp, PgDn | The first cell, the last, a screen up or down |157-| Enter | Edit the cell; on an output, open it full-screen |209+| Enter | Edit the cell; on a table or record output, work in its grid; on another, open it full-screen |158210 | Shift+Enter | Run the cells and select the next, adding one at the end |159211 | Ctrl+Enter, `r` | Run the cells, staying on them |160212 | Alt+Enter | Run the cells and add a code cell under them |@@ -147,7 +147,7 @@ on a sheet, `!` starts an entry as any character does.
147147 | Up, Down, `j`, `k`, Home, End, PgUp, PgDn | Move between cells and their outputs; on an output, Up and Down scroll its window first |148148 | Shift+Up, Shift+Down, `K`, `J` | Select the cells passed over too, to run, delete, copy or move together |149149 | Alt+Up, Alt+Down, Ctrl+Shift+Up, Ctrl+Shift+Down | Move the selected cells up or down |150-| Enter | Edit the cell; on an output, open it full-screen |150+| Enter | Edit the cell; on a table or record output, work in its grid; on another output, open it full-screen |151151 | Shift+Enter, Ctrl+Enter, `r`, Alt+Enter | Run the cells and select the next; run them in place (`r` too); run them and add a cell under them |152152 | F9 | Run every cell |153153 | `a`, `b`, `!` | Add a code cell above, below; add one below and edit it |@@ -167,11 +167,19 @@ on a sheet, `!` starts an entry as any character does.
167167 | Up, Down, Home, End, Ctrl+A, Ctrl+E | Move by the lines on screen; the start, the end of the line |168168 | Word keys | As [anywhere text is edited](#entering-data); Ctrl+U deletes to the start of the line, not the cell |169169 170-| Key | On an output full-screen |170+| Key | In a table's or record's output ([its grid](../nushell/notebooks.md#outputs-as-grids)) |171171 |---|---|172-| Arrows, `h`, `j`, `k`, `l`, PgUp, PgDn, `g`, `G` | Move |173-| `s`, `S` | Sort by the pointer's column, A to Z or Z to A; again for the output's order |174-| `/` | Keep the rows holding what's typed; Esc clears it |172+| Arrows, Shift+arrows, Ctrl+arrows, PgUp, PgDn, Ctrl+A | Move and select, as [on a sheet](#selecting); the status line shows Sum, Avg and Count |173+| Ctrl+C | Copy the selection, to paste on a sheet or elsewhere |174+| Ctrl+F | Find in the output |175+| Alt+Down | With a filter on (Data > Create a filter), the column's filter |176+| Ctrl+Z, Ctrl+Y | Undo, redo a sort, a filter or a column's width |177+| Enter | Show the grid full-screen |178+| Esc | Deselect; then back from full-screen, then back to the notebook |179+180+| Key | On any other output full-screen |181+|---|---|182+| Up, Down, `j`, `k`, PgUp, PgDn, `g`, `G` | Move |175183 | Esc, `q` | Back to the notebook |176184 177185 ## Keys the terminal has to tell apart@@ -323,7 +331,8 @@ On a notebook's tab, as in JupyterLab:
323331 | Click a cell; Shift+click | Select it; select the cells between too |324332 | Click in a code cell's box; double-click a note | Edit it, the caret where you clicked |325333 | Click `▶` (`■` while it runs) | Run the cell (stop it) |326-| Click an output; double-click it | Select it; open it full-screen |334+| Click an output; double-click it | Select it (in a table's or record's grid, the cell clicked, to work in it); open it full-screen |335+| Drag in an output's grid; drag its column header's right edge | Select cells; resize the column |327336 | Click left of an output | Hide it, or show it again |328337 | Wheel over an output's window | Scroll the output, then the notebook |329338 | Click a toolbar button | Run, stop, restart, run all, add, cut, copy, paste, or pick the cell's kind |