113 lines
3.0 KiB
JSON
113 lines
3.0 KiB
JSON
{
|
|
"name": "bare-os-shell",
|
|
"section": 1,
|
|
"title": "Bare OS interactive shell builtins",
|
|
"synopsis": ["# builtins only — no full POSIX sh grammar"],
|
|
"description": "The line-at-a-time shell supports aliases, simple pipelines (simulated), redirection, and the builtins below. Compound commands (if, for, while) are not available.",
|
|
"options": [],
|
|
"aliases": ["sh-builtins"],
|
|
"keywords": [
|
|
"shell",
|
|
"builtin",
|
|
"cd",
|
|
"export",
|
|
"alias",
|
|
"bare-os-shell",
|
|
"sh-builtins"
|
|
],
|
|
"builtins": [
|
|
{
|
|
"name": "alias",
|
|
"synopsis": ["alias", "alias name=value ...", "unalias name ..."],
|
|
"description": "Define or list command aliases. unalias removes definitions."
|
|
},
|
|
{
|
|
"name": "cd",
|
|
"synopsis": ["cd [DIR]"],
|
|
"description": "Change working directory via vfs.chdir; default is HOME."
|
|
},
|
|
{
|
|
"name": "export",
|
|
"synopsis": ["export NAME=value ..."],
|
|
"description": "Set environment variables visible to child /bin invocations."
|
|
},
|
|
{
|
|
"name": "unset",
|
|
"synopsis": ["unset NAME ..."],
|
|
"description": "Remove variables; readonly names cannot be unset."
|
|
},
|
|
{
|
|
"name": "readonly",
|
|
"synopsis": ["readonly NAME[=value] ..."],
|
|
"description": "Mark variables read-only."
|
|
},
|
|
{
|
|
"name": "umask",
|
|
"synopsis": ["umask [octal]"],
|
|
"description": "Show or set shell file creation mask (stored in env UMASK)."
|
|
},
|
|
{
|
|
"name": "command",
|
|
"synopsis": ["command -v|-V NAME", "command ARGV..."],
|
|
"description": "Resolve or run a command without using shell functions (none) or aliases for -v/-V."
|
|
},
|
|
{
|
|
"name": "type",
|
|
"synopsis": ["type NAME"],
|
|
"description": "Report whether NAME is a builtin or a path under PATH."
|
|
},
|
|
{
|
|
"name": "login / logout",
|
|
"synopsis": ["login [--new] passphrase...", "logout [--save]"],
|
|
"description": "Identity unlock/register and session teardown; require booter hooks."
|
|
},
|
|
{
|
|
"name": ":",
|
|
"synopsis": [":"],
|
|
"description": "No-op builtin."
|
|
},
|
|
{
|
|
"name": "exit",
|
|
"synopsis": ["exit [n]"],
|
|
"description": "Request booter exit with status n (builtin path)."
|
|
}
|
|
],
|
|
"seeAlso": [
|
|
{
|
|
"name": "help",
|
|
"section": 1
|
|
},
|
|
{
|
|
"name": "man",
|
|
"section": 1
|
|
}
|
|
],
|
|
"bareOsNotes": "Pipelines do not use OS pipes; see handbook ch.4 and ch.9.",
|
|
"examples": [
|
|
{
|
|
"caption": "pipeline (simulated)",
|
|
"code": "ls -1 /bin | grep man"
|
|
},
|
|
{
|
|
"caption": "redirect out",
|
|
"code": "echo hi > ~/hello.txt"
|
|
},
|
|
{
|
|
"caption": "append",
|
|
"code": "date >> ~/log.txt"
|
|
},
|
|
{
|
|
"caption": "alias + use",
|
|
"code": "alias ll='ls -la'\nll ~"
|
|
},
|
|
{
|
|
"caption": "export for children",
|
|
"code": "export EDITOR=ed\nman ls"
|
|
},
|
|
{
|
|
"caption": "temp var for one command",
|
|
"code": "PATH=/bin man which"
|
|
}
|
|
]
|
|
}
|