rush-builtins - builtin commands provided by Rush
Builtins are commands Rush executes without searching PATH. POSIX builtins are shell core. Compatibility and Rush-specific builtins are default extensions.
Embedders may provide another extension builtin registry. POSIX special builtin behavior stays in the shell core.
Rush provides POSIX special builtins. They resolve before functions and use POSIX-defined error and assignment semantics.
:- Return success without doing anything.
.- Read and execute commands from a file in the current shell environment.
break- Exit enclosing
for, while, or until loops.
continue- Continue enclosing
for, while, or until loops.
eval- Concatenate arguments and evaluate the result as shell input.
exec- Replace the shell with a command, or apply redirections to the current shell.
exit- Exit the shell.
export- Mark variables for export to child process environments.
readonly- Mark variables as readonly.
return- Return from a function or sourced script.
set- Set shell options and positional parameters.
shift- Shift positional parameters.
times- Print accumulated shell and child process times.
trap- Register commands to run when signals are received.
unset- Unset variables or functions.
Rush also provides POSIX regular builtins. They follow normal command lookup and may be shadowed by functions.
[- Evaluate a conditional expression; synonym for
test requiring a closing ].
alias- Define or print command aliases.
bg- Resume jobs in the background.
cd- Change the current working directory.
command- Execute or describe a command while suppressing shell function lookup.
echo- Write arguments to standard output.
env- Run a command with a modified environment, or print the environment.
false- Return an unsuccessful status.
fc- List or edit command history.
fg- Resume jobs in the foreground.
getopts- Parse shell function option arguments.
hash- Remember or report command path lookups.
jobs- Report active jobs.
kill- Send signals to processes or jobs.
printf- Format and write data.
pwd- Print the current working directory.
read- Read a line and assign fields to variables.
test- Evaluate a conditional expression.
true- Return a successful status.
ulimit- Get or set process resource limits.
umask- Get or set the file mode creation mask.
unalias- Remove command aliases.
wait- Wait for jobs or process IDs to complete.
Compatibility builtins are non-POSIX extensions included because they are common in interactive config and shell-adjacent scripts.
declare- Declare variables and indexed arrays with Bash-compatible attributes.
local- Declare variables local to the current function invocation.
shopt- Inspect or update compatibility shell options.
source- Read and execute commands from a file in the current shell environment.
typeset- Alias for
declare.
type- Describe how command names would be resolved.
Rush-specific builtins expose interactive features through shell commands.
abbr- Manage fish-style interactive abbreviations.
color- Derive
#rrggbb colors for prompt and UI style configuration.
event- Manage named shell event hook registrations.
history- List, search, or delete command history entries.
prompt- Append styled text and cached async command output while rendering the interactive prompt.
prompt_duration- Print the previous foreground command duration for prompt rendering.
prompt_pwd- Print a prompt-friendly current directory.
rush_complete- Emit candidates and inspect context while running completion providers.
rush_env- Import environment updates from standard input.
z- Jump to frecent directories using zoxide-style history matching.
rush configuration, rush compatibility notes, POSIX Shell Command Language.