This commit is contained in:
Raven Scott
2026-04-03 17:56:46 -04:00
parent a7e08e093c
commit ec236f9cc7
28 changed files with 1052 additions and 97 deletions
@@ -3,22 +3,32 @@
"section": 1,
"title": "get configuration values",
"synopsis": [
"getconf [OPTION]... [OPERAND]..."
"getconf [-a] system_var"
],
"description": "Prints a fixed subset of POSIX-style limit names and values for Bare OS. There is no host sysconf path; constants match the documented JavaScript/VFS environment.",
"options": [
{
"flag": "-a",
"meaning": "Write every known variable (each name on one line, value on the next)"
}
],
"description": "Host sysconf-style values are not exposed. The command prints an error.",
"options": [],
"keywords": [
"getconf",
"limits",
"PATH_MAX",
"POSIX",
"bare-os",
"coreutils",
"stub"
"coreutils"
],
"stub": true,
"bareOsNotes": "Stub only; no kernel sysconf surface.",
"bareOsNotes": "Subset only; unknown names fail with exit status 1. See src/getconf.js for the name table.",
"examples": [
{
"caption": "stub",
"code": "# getconf PATH_MAX — not available on Bare OS"
"caption": "path length limit",
"code": "getconf PATH_MAX"
},
{
"caption": "list known names and values",
"code": "getconf -a"
}
]
}
@@ -3,21 +3,37 @@
"section": 1,
"title": "construct argument lists and invoke utility",
"synopsis": [
"xargs [OPTION]... [OPERAND]..."
"xargs [-0] [-n maxargs] [--] [utility [argument ...]]"
],
"description": "Reads stdin, splits into words (or null-terminated records with -0), and invokes the utility via ctx.runBinCommand in batches. Enforces fixed limits on stdin size, token count, arguments per run, and total invocations.",
"options": [
{
"flag": "-0, --null",
"meaning": "Input items are separated by null bytes instead of whitespace"
},
{
"flag": "-n maxargs, --max-args maxargs",
"meaning": "Use at most maxargs arguments from stdin per utility invocation (capped at 128)"
}
],
"description": "xargs does not spawn arbitrary /bin utilities on Bare OS. Use shell word splitting or pipelines.",
"options": [],
"keywords": [
"xargs",
"arguments",
"bare-os",
"coreutils",
"stub"
"coreutils"
],
"stub": true,
"bareOsNotes": "No process fork model; see handbook ch.9.",
"bareOsNotes": "No host fork; subset of POSIX/GNU xargs. See src/xargs.js for numeric limits.",
"examples": [
{
"caption": "workaround: shell word split",
"caption": "pass lines as arguments",
"code": "printf 'a\\nb\\n' | xargs echo"
},
{
"caption": "one argument per run",
"code": "printf 'a\\nb\\n' | xargs -n1 echo"
},
{
"caption": "workaround for complex scripts",
"code": "# for f in *.txt; do grep -l foo $f; done"
}
]