Files
bare-operating-system/packages/bare-os-coreutils/man/pages/edit.json
T
2026-04-03 21:59:05 -04:00

20 lines
990 B
JSON

{
"name": "edit",
"section": 1,
"title": "terminal file editor with syntax highlighting",
"synopsis": ["edit [file]", "edit -h|--help"],
"description": "Full-screen TUI editor (nano-style) for the Bare OS shell. Uses the session TTY (ctx.replStdin / replStdout), suspends the fish readline layer while active, and reads/writes paths via the VFS. Syntax highlighting is best-effort for JavaScript/TypeScript, JSON, shell, Markdown, and plain text. Files larger than 2,000,000 characters are rejected. The shell alias nano invokes edit.",
"options": [
{
"flag": "-h, --help",
"meaning": "Print usage and exit."
}
],
"keywords": ["edit", "nano", "editor", "tty", "syntax"],
"bareOsNotes": "Requires an interactive TTY (stdin.isTTY). Uses ctx.suspendReplForSubprocess / resumeReplAfterSubprocess around raw mode.",
"examples": [
{ "caption": "edit a file", "code": "edit README.md" },
{ "caption": "same via alias", "code": "nano foo.js" }
]
}