nfirvine.comwiki

Builtins

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.

Builtin Commands

These commands are similar to builtins used in bash and various other shells.

Common AliasCanonical NameDescription
aliasset-aliasSets an alias for a command.
builtinexecute-builtinExecutes a builtin (i.e., instead of an external command).
cdset-locationSets the current location in tree.
echoprint-stringPrints a string to the terminal.
enableenable-builtinEnables a builtin.
evalexecute-stringExecutes a string (or list of strings) as if it were typed at the prompt.
execexecute-commandExecutes command, replacing current shell.
exitexit-shellExits the current shell.
exportexport-nameExports shell functions or variables to child processes.
hashhash-nameRemembers location of command so that it need not be searched for in the future.
helpprint-helpPrints help on various subjects.
logoutlogout-shellLogs out of login shell.
popdpop-locationPops location off of location stack and changes location to it.
pushdpush-locationPushes current location onto location stack and changes location to one specified.
pwdget-locationReturns the current location.
readget-inputGets input from user for storage into variable.
readlistget-input +arrayGets input from user, and store in a list.
readonly Marks a name as readonly.
readmappingget-input +mappingGets input from user, and store in mapping.
returnreturn-valueExits a shell function with a value.
sourceimport-scriptImports (executes in current shell) a script file.
test/[test-expressionTests an expression for truth.
traptrap-signalCatches signals.
typeget-commandtypeGets type of command: alias, builtin, function, command.
umaskset-umaskSets the umask to used when creating new files.
unaliasremove-aliasUnsets an alias.
unsetremove-nameUnsets a name (variable or function).

Powered by PmWiki