Filed in: Yamsh.Builtins · Modified on : Thu, 19 Nov 09
Builtins are internal commands (as opposed to external applications) that are used to change the running state of yamsh, namely, the System. They are executed in the current shell process, not a new process.
These commands are similar to builtins used in bash and various other shells.
| Common Alias | Canonical Name | Description |
|---|---|---|
| alias | set-alias | Sets an alias for a command. |
| builtin | execute-builtin | Executes a builtin (i.e., instead of an external command). |
| cd | set-location | Sets the current location in tree. |
| echo | print-string | Prints a string to the terminal. |
| enable | enable-builtin | Enables a builtin. |
| eval | execute-string | Executes a string (or list of strings) as if it were typed at the prompt. |
| exec | execute-command | Executes command, replacing current shell. |
| exit | exit-shell | Exits the current shell. |
| export | export-name | Exports shell functions or variables to child processes. |
| hash | hash-name | Remembers location of command so that it need not be searched for in the future. |
| help | print-help | Prints help on various subjects. |
| logout | logout-shell | Logs out of login shell. |
| popd | pop-location | Pops location off of location stack and changes location to it. |
| pushd | push-location | Pushes current location onto location stack and changes location to one specified. |
| pwd | get-location | Returns the current location. |
| read | get-input | Gets input from user for storage into variable. |
| readlist | get-input +array | Gets input from user, and store in a list. |
| readonly | Marks a name as readonly. | |
| readmapping | get-input +mapping | Gets input from user, and store in mapping. |
| return | return-value | Exits a shell function with a value. |
| source | import-script | Imports (executes in current shell) a script file. |
| test/[ | test-expression | Tests an expression for truth. |
| trap | trap-signal | Catches signals. |
| type | get-commandtype | Gets type of command: alias, builtin, function, command. |
| umask | set-umask | Sets the umask to used when creating new files. |
| unalias | remove-alias | Unsets an alias. |
| unset | remove-name | Unsets a name (variable or function). |