RUSH-BUILTINS(7)

NAME

rush-builtins - builtin commands provided by Rush

DESCRIPTION

Builtins are commands executed by Rush itself instead of by searching PATH. POSIX builtins are part of the shell core. Compatibility and Rush-specific builtins are extension builtins included by the default Rush registry.

Embedders may provide their own extension builtin registry. Extension builtins are regular builtins; POSIX special builtin behavior is reserved for the shell core.

POSIX SPECIAL BUILTINS

Rush provides the POSIX special builtin names. Special builtins are found before shell functions and have 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.

POSIX REGULAR BUILTINS

Rush also provides POSIX regular builtin names. Regular builtins follow normal command lookup order 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

Compatibility builtins are non-POSIX extension builtins included by the default Rush registry because they are common in interactive shell configuration and portable shell-adjacent scripts.

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.
type
Describe how command names would be resolved.

RUSH BUILTINS

Rush-specific builtins expose interactive shell features through normal shell commands.

abbr
Manage fish-style interactive abbreviations.
color
Derive #rrggbb colors for prompt and UI style configuration.
prompt
Append styled text while rendering the interactive prompt.
prompt_async
Return cached prompt command output and refresh it in the background.
prompt_duration
Print the previous foreground command duration for prompt rendering.
prompt_pwd
Print a prompt-friendly current directory.

SEE ALSO

rush configuration, rush compatibility notes, POSIX Shell Command Language.