Repository navigation
Commit 1ea4653
authored
feat(terminal): nano editor builtin (#2547)
## What changed
- New `nano` builtin in terminal sessions: a subset GNU-nano-style
editor with typing, cursor keys, `^O` write out, `^X` exit (asks to save
when modified), `^K`/`^U` cut and paste a line, `^W` search, `^G` help
and `^C` cursor position.
- `EDITOR=nano` works for the `$EDITOR` flows (`git commit` without
`-m`).
- The unsupported surface is documented as L-TERM-005; the threat model
entry TM-DOS-119 now covers nano's buffers.
## Why
Agents and the scripts they run often default to `nano`. Without it,
`EDITOR=nano git commit` failed and agents had to know to switch to vi.
## Before / After
Before: `nano notes.txt` → `nano: command not found` (127).
After: `nano notes.txt` → editor with title bar and shortcut bar; type,
`^O` Enter saves, `^X` returns to the prompt; `cat notes.txt` shows the
edit. `EDITOR=nano git commit` → type the message, `^X`, `y` → commit
created.
## Risk
- Low. `terminal` feature only (off by default); new builtin, no change
to existing commands.
## Checklist
- [x] Tests added or updated
- [x] Backward compatibility considered
---
_Generated by [Claude
Code](https://claude.ai/code/session_01X1g3pvv3cZECEhMrysGgJw)_1 parent f7e2d61 commit 1ea4653
12 files changed
Lines changed: 751 additions & 9 deletions
File tree
- .github/workflows
- crates/bashkit
- src
- builtins
- interpreter
- terminal
- tests/integration
- docs
- knowledge
- integrations
- operations
- security
- status
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
| 238 | + | |
| 239 | + | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
| |||
0 commit comments