The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Psh::Builtins - package for Psh builtins, possibly loading them as needed

SYNOPSIS

  use Psh::Builtins;

DESCRIPTION

Psh::Builtins currently contains only the hardcoded builtins of Perl Shell, but may later on be extended to load them on the fly from separate modules.

Builtins

  • setenv NAME [=] VALUE

    Sets the environment variable NAME to VALUE.

  • delenv NAME [NAME2 NAME3 ...]

    Deletes the names environment variables.

  • export VAR [=VALUE]

    Just like setenv, below, except that it also ties the variable (in the Perl sense) so that subsequent changes to the variable automatically affect the environment. Variables who are lists and appear in %Psh::array_exports will also by tied to the array of the same name. Note that the variable must be specified without any Perl specifier like $ or @.

  • cd DIR

    Change the working directory to DIR or home if DIR is not specified. The special DIR "-" is interpreted as "return to the previous directory".

  • alias [NAME [=] REPLACEMENT]

    Add NAME as a built-in so that NAME <REST_OF_LINE> will execute exactly as if REPLACEMENT <REST_OF_LINE> had been entered. For example, one can execute alias ls ls -F to always supply the -F option to "ls". Note the built-in is defined to avoid recursion here.

    With no arguments, prints out a list of the current aliases. With only the NAME argument, prints out a definition of the alias with that name.

  • unalias NAME | -a | all]

    Removes the alias with name <NAME or all aliases if either <-a (for bash compatibility) or <all is specified.

AUTHOR

the Psh team

SEE ALSO

psh