implemented 'getopts' builtin

This commit is contained in:
2026-03-01 21:16:33 -05:00
parent 2ea44c55e9
commit 5a62f72947
9 changed files with 344 additions and 25 deletions

View File

@@ -24,12 +24,14 @@ pub mod zoltraak;
pub mod map;
pub mod arrops;
pub mod intro;
pub mod getopts;
pub const BUILTINS: [&str; 43] = [
pub const BUILTINS: [&str; 44] = [
"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"
"unset", "complete", "compgen", "map", "pop", "fpop", "push", "fpush", "rotate", "wait", "type",
"getopts"
];
pub fn true_builtin() -> ShResult<()> {