Add ulimit builtin and optimize shed -c to exec single commands directly without forking

This commit is contained in:
2026-03-06 11:07:46 -05:00
parent 8a7211d42e
commit 42b4120055
6 changed files with 279 additions and 56 deletions

View File

@@ -24,13 +24,14 @@ pub mod test; // [[ ]] thing
pub mod trap;
pub mod varcmds;
pub mod zoltraak;
pub mod resource;
pub const BUILTINS: [&str; 47] = [
pub const BUILTINS: [&str; 49] = [
"echo", "cd", "read", "export", "local", "pwd", "source", "shift", "jobs", "fg", "bg", "disown",
"alias", "unalias", "return", "break", "continue", "exit", "zoltraak", "shopt", "builtin",
"command", "trap", "pushd", "popd", "dirs", "exec", "eval", "true", "false", ":", "readonly",
"unset", "complete", "compgen", "map", "pop", "fpop", "push", "fpush", "rotate", "wait", "type",
"getopts", "keymap", "read_key", "autocmd",
"getopts", "keymap", "read_key", "autocmd", "ulimit", "umask"
];
pub fn true_builtin() -> ShResult<()> {