Crate yash_builtin
source ·Expand description
Implementation of the shell built-in utilities.
Each built-in utility is implemented in the submodule named after the
utility. The submodule contains the main
function that implements the
built-in utility. The submodule many also export other items that are used
by the main
function. The module documentation for each submodule
describes the specification of the built-in utility.
The common
module provides common functions that are used for
implementing built-in utilities.
§Stack
Many built-ins in this crate use Stack::current_builtin
to obtain the
command word that invoked the built-in. It is used to report the command
location in error messages, switch the behavior of the built-in depending on
the command, etc. For the built-ins to work correctly, the
stack should contain a built-in frame so
that Stack::current_builtin
provides the correct command word.
§Optional dependency
The yash-builtin
crate has an optional dependency on the yash-semantics
crate, which is enabled by default. If you disable the yash-semantics
feature, the following built-ins will be unavailable:
command
eval
exec
read
source
type
wait
Re-exports§
pub use yash_env::builtin::*;
Modules§
- Alias built-in.
- Bg built-in
- Break built-in
- Cd built-in
- Colon (
:
) built-in - Command built-in
- Common items for implementing built-ins
- Continue built-in
- Eval built-in
- Exec built-in
- Exit built-in
- Export built-in
- False built-in
- Fg built-in
- Getopts built-in
- Jobs built-in
- Kill built-in
- Pwd built-in.
- Read built-in
- Readonly built-in.
- Return built-in.
- Set built-in
- Shift built-in
- Source (
.
) built-in - Times built-in
- Trap built-in.
- True built-in
- Type built-in
- Typeset built-in
- Ulimit built-in
- Umask built-in
- Unalias built-in
- Unset built-in
- Wait built-in
Constants§
- Array of all the implemented built-in utilities.