Add edit program
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"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" }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "nano",
|
||||
"section": 1,
|
||||
"title": "alias for edit — terminal file editor",
|
||||
"synopsis": ["nano [file]"],
|
||||
"description": "The /bin/nano script is identical to edit. In the default shell, the name nano is also an alias for edit. See edit(1) for behavior, key bindings, and requirements.",
|
||||
"options": [],
|
||||
"keywords": ["nano", "edit", "editor"],
|
||||
"bareOsNotes": "Same implementation as edit; see man edit.",
|
||||
"examples": [{ "caption": "open a file", "code": "nano ~/.barerc" }]
|
||||
}
|
||||
Reference in New Issue
Block a user