Expand description
Shell builtin IDs for CallBuiltin(id, argc) dispatch.
These IDs are used by shell frontends (zshrs) to emit bytecodes that call registered builtin handlers. The VM dispatches through the pre-registered function pointer table — no name lookup at runtime.
Usage in frontend compiler:
use fusevm::{ChunkBuilder, Op};
use fusevm::shell_builtins::*;
let mut builder = ChunkBuilder::new();
builder.emit(Op::CallBuiltin(BUILTIN_CD, 1), 1);Usage in frontend VM init:
use fusevm::{ChunkBuilder, VM, Value};
use fusevm::shell_builtins::*;
let chunk = ChunkBuilder::new().build();
let mut vm = VM::new(chunk);
vm.register_builtin(BUILTIN_CD, |_vm, _argc| Value::Status(0));Constants§
- BUILTIN_
ALIAS - Dispatch ID for the shell
aliasbuiltin. - BUILTIN_
ASYNC - Dispatch ID for the shell
asyncbuiltin. - BUILTIN_
AUTOLOAD - Dispatch ID for the shell
autoloadbuiltin. - BUILTIN_
AWAIT - Dispatch ID for the shell
awaitbuiltin. - BUILTIN_
BARRIER - Dispatch ID for the shell
barrierbuiltin. - BUILTIN_
BASENAME - Dispatch ID for the shell
basenamebuiltin. - BUILTIN_
BG - Dispatch ID for the shell
bgbuiltin. - BUILTIN_
BINDKEY - Dispatch ID for the shell
bindkeybuiltin. - BUILTIN_
BREAK - Dispatch ID for the shell
breakbuiltin. - BUILTIN_
BUILTIN - Dispatch ID for the shell
builtinbuiltin. - BUILTIN_
CALLER - Dispatch ID for the shell
callerbuiltin. - BUILTIN_
CAT - Dispatch ID for the shell
catbuiltin. - BUILTIN_
CD - Dispatch ID for the shell
cdbuiltin. - BUILTIN_
CDREPLAY - Dispatch ID for the shell
cdreplaybuiltin. - BUILTIN_
COLON - Dispatch ID for the shell
:builtin. - BUILTIN_
COMMAND - Dispatch ID for the shell
commandbuiltin. - BUILTIN_
COMPADD - Dispatch ID for the shell
compaddbuiltin. - BUILTIN_
COMPDEF - Dispatch ID for the shell
compdefbuiltin. - BUILTIN_
COMPGEN - Dispatch ID for the shell
compgenbuiltin. - BUILTIN_
COMPINIT - Dispatch ID for the shell
compinitbuiltin. - BUILTIN_
COMPLETE - Dispatch ID for the shell
completebuiltin. - BUILTIN_
COMPOPT - Dispatch ID for the shell
compoptbuiltin. - BUILTIN_
COMPSET - Dispatch ID for the shell
compsetbuiltin. - BUILTIN_
CONTINUE - Dispatch ID for the shell
continuebuiltin. - BUILTIN_
CUT - Dispatch ID for the shell
cutbuiltin. - BUILTIN_
DATE - Dispatch ID for the shell
datebuiltin. - BUILTIN_
DBVIEW - Dispatch ID for the shell
dbviewbuiltin. - BUILTIN_
DECLARE - Dispatch ID for the shell
declarebuiltin. - BUILTIN_
DIRNAME - Dispatch ID for the shell
dirnamebuiltin. - BUILTIN_
DIRS - Dispatch ID for the shell
dirsbuiltin. - BUILTIN_
DISABLE - Dispatch ID for the shell
disablebuiltin. - BUILTIN_
DISOWN - Dispatch ID for the shell
disownbuiltin. - BUILTIN_
DOCTOR - Dispatch ID for the shell
doctorbuiltin. - BUILTIN_
DOT - Dispatch ID for the shell
.builtin. - BUILTIN_
ECHO - Dispatch ID for the shell
echobuiltin. - BUILTIN_
EMULATE - Dispatch ID for the shell
emulatebuiltin. - BUILTIN_
ENABLE - Dispatch ID for the shell
enablebuiltin. - BUILTIN_
EVAL - Dispatch ID for the shell
evalbuiltin. - BUILTIN_
EXEC - Dispatch ID for the shell
execbuiltin. - BUILTIN_
EXIT - Dispatch ID for the shell
exitbuiltin. - BUILTIN_
EXPORT - Dispatch ID for the shell
exportbuiltin. - BUILTIN_
FALSE - Dispatch ID for the shell
falsebuiltin. - BUILTIN_
FC - Dispatch ID for the shell
fcbuiltin. - BUILTIN_
FG - Dispatch ID for the shell
fgbuiltin. - BUILTIN_
FIND - Dispatch ID for the shell
findbuiltin. - BUILTIN_
FLOAT - Dispatch ID for the shell
floatbuiltin. - BUILTIN_
FUNCTIONS - Dispatch ID for the shell
functionsbuiltin. - BUILTIN_
GETOPTS - Dispatch ID for the shell
getoptsbuiltin. - BUILTIN_
HASH - Dispatch ID for the shell
hashbuiltin. - BUILTIN_
HEAD - Dispatch ID for the shell
headbuiltin. - BUILTIN_
HELP - Dispatch ID for the shell
helpbuiltin. - BUILTIN_
HISTORY - Dispatch ID for the shell
historybuiltin. - BUILTIN_
HOSTNAME - Dispatch ID for the shell
hostnamebuiltin. - BUILTIN_
ID - Dispatch ID for the shell
idbuiltin. - BUILTIN_
INTEGER - Dispatch ID for the shell
integerbuiltin. - BUILTIN_
INTERCEPT - Dispatch ID for the shell
interceptbuiltin. - BUILTIN_
INTERCEPT_ PROCEED - Dispatch ID for the shell
intercept_proceedbuiltin. - BUILTIN_
JOBS - Dispatch ID for the shell
jobsbuiltin. - BUILTIN_
KILL - Dispatch ID for the shell
killbuiltin. - BUILTIN_
LET - Dispatch ID for the shell
letbuiltin. - BUILTIN_
LIMIT - Dispatch ID for the shell
limitbuiltin. - BUILTIN_
LOCAL - Dispatch ID for the shell
localbuiltin. - BUILTIN_
MAPFILE - Dispatch ID for the shell
mapfilebuiltin. - BUILTIN_
MAX - Maximum builtin ID (for pre-allocating the handler table)
- BUILTIN_
MKDIR - Dispatch ID for the shell
mkdirbuiltin. - BUILTIN_
MKTEMP - Dispatch ID for the shell
mktempbuiltin. - BUILTIN_
NOGLOB - Dispatch ID for the shell
noglobbuiltin. - BUILTIN_
PCRE_ COMPILE - Dispatch ID for the shell
pcre_compilebuiltin. - BUILTIN_
PCRE_ MATCH - Dispatch ID for the shell
pcre_matchbuiltin. - BUILTIN_
PCRE_ STUDY - Dispatch ID for the shell
pcre_studybuiltin. - BUILTIN_
PEACH - Dispatch ID for the shell
peachbuiltin. - BUILTIN_
PGREP - Dispatch ID for the shell
pgrepbuiltin. - BUILTIN_
PMAP - Dispatch ID for the shell
pmapbuiltin. - BUILTIN_
POPD - Dispatch ID for the shell
popdbuiltin. - BUILTIN_
PRINT - Dispatch ID for the shell
printbuiltin. - BUILTIN_
PRINTF - Dispatch ID for the shell
printfbuiltin. - BUILTIN_
PROFILE - Dispatch ID for the shell
profilebuiltin. - BUILTIN_
PROMPT - Dispatch ID for the shell
promptbuiltin. - BUILTIN_
PROMPTINIT - Dispatch ID for the shell
promptinitbuiltin. - BUILTIN_
PUSHD - Dispatch ID for the shell
pushdbuiltin. - BUILTIN_
PWD - Dispatch ID for the shell
pwdbuiltin. - BUILTIN_
R - Dispatch ID for the shell
rbuiltin. - BUILTIN_
READ - Dispatch ID for the shell
readbuiltin. - BUILTIN_
READONLY - Dispatch ID for the shell
readonlybuiltin. - BUILTIN_
REALPATH - Dispatch ID for the shell
realpathbuiltin. - BUILTIN_
REHASH - Dispatch ID for the shell
rehashbuiltin. - BUILTIN_
RETURN - Dispatch ID for the shell
returnbuiltin. - BUILTIN_
REV - Dispatch ID for the shell
revbuiltin. - BUILTIN_
SEQ - Dispatch ID for the shell
seqbuiltin. - BUILTIN_
SET - Dispatch ID for the shell
setbuiltin. - BUILTIN_
SETOPT - Dispatch ID for the shell
setoptbuiltin. - BUILTIN_
SHIFT - Dispatch ID for the shell
shiftbuiltin. - BUILTIN_
SHOPT - Dispatch ID for the shell
shoptbuiltin. - BUILTIN_
SLEEP - Dispatch ID for the shell
sleepbuiltin. - BUILTIN_
SORT - Dispatch ID for the shell
sortbuiltin. - BUILTIN_
SOURCE - Dispatch ID for the shell
sourcebuiltin. - BUILTIN_
STRFTIME - Dispatch ID for the shell
strftimebuiltin. - BUILTIN_
SUSPEND - Dispatch ID for the shell
suspendbuiltin. - BUILTIN_
SYNC - Dispatch ID for the shell
syncbuiltin. - BUILTIN_
TAIL - Dispatch ID for the shell
tailbuiltin. - BUILTIN_
TEE - Dispatch ID for the shell
teebuiltin. - BUILTIN_
TEST - Dispatch ID for the shell
testbuiltin. - BUILTIN_
TIMES - Dispatch ID for the shell
timesbuiltin. - BUILTIN_
TOUCH - Dispatch ID for the shell
touchbuiltin. - BUILTIN_
TR - Dispatch ID for the shell
trbuiltin. - BUILTIN_
TRAP - Dispatch ID for the shell
trapbuiltin. - BUILTIN_
TRUE - Dispatch ID for the shell
truebuiltin. - BUILTIN_
TTYCTL - Dispatch ID for the shell
ttyctlbuiltin. - BUILTIN_
TYPE - Dispatch ID for the shell
typebuiltin. - BUILTIN_
TYPESET - Dispatch ID for the shell
typesetbuiltin. - BUILTIN_
ULIMIT - Dispatch ID for the shell
ulimitbuiltin. - BUILTIN_
UMASK - Dispatch ID for the shell
umaskbuiltin. - BUILTIN_
UNALIAS - Dispatch ID for the shell
unaliasbuiltin. - BUILTIN_
UNAME - Dispatch ID for the shell
unamebuiltin. - BUILTIN_
UNFUNCTION - Dispatch ID for the shell
unfunctionbuiltin. - BUILTIN_
UNHASH - Dispatch ID for the shell
unhashbuiltin. - BUILTIN_
UNIQ - Dispatch ID for the shell
uniqbuiltin. - BUILTIN_
UNLIMIT - Dispatch ID for the shell
unlimitbuiltin. - BUILTIN_
UNSET - Dispatch ID for the shell
unsetbuiltin. - BUILTIN_
UNSETOPT - Dispatch ID for the shell
unsetoptbuiltin. - BUILTIN_
VARED - Dispatch ID for the shell
varedbuiltin. - BUILTIN_
WAIT - Dispatch ID for the shell
waitbuiltin. - BUILTIN_
WC - Dispatch ID for the shell
wcbuiltin. - BUILTIN_
WHENCE - Dispatch ID for the shell
whencebuiltin. - BUILTIN_
WHERE - Dispatch ID for the shell
wherebuiltin. - BUILTIN_
WHICH - Dispatch ID for the shell
whichbuiltin. - BUILTIN_
WHOAMI - Dispatch ID for the shell
whoamibuiltin. - BUILTIN_
ZCOMPILE - Dispatch ID for the shell
zcompilebuiltin. - BUILTIN_
ZFORMAT - Dispatch ID for the shell
zformatbuiltin. - BUILTIN_
ZGDBMPATH - Dispatch ID for the shell
zgdbmpathbuiltin. - BUILTIN_
ZLE - Dispatch ID for the shell
zlebuiltin. - BUILTIN_
ZMODLOAD - Dispatch ID for the shell
zmodloadbuiltin. - BUILTIN_
ZPARSEOPTS - Dispatch ID for the shell
zparseoptsbuiltin. - BUILTIN_
ZPROF - Dispatch ID for the shell
zprofbuiltin. - BUILTIN_
ZREGEXPARSE - Dispatch ID for the shell
zregexparsebuiltin. - BUILTIN_
ZSLEEP - Dispatch ID for the shell
zsleepbuiltin. - BUILTIN_
ZSTYLE - Dispatch ID for the shell
zstylebuiltin. - BUILTIN_
ZSYSTEM - Dispatch ID for the shell
zsystembuiltin. - BUILTIN_
ZTIE - Dispatch ID for the shell
ztiebuiltin. - BUILTIN_
ZUNTIE - Dispatch ID for the shell
zuntiebuiltin.
Functions§
- builtin_
id - Map builtin name to ID. Returns None for non-builtins.
- is_
builtin - Check if a command name is a builtin.