Supported Zsh Features

Zsh has an extensible set of features which are also supported, maintained and used in other operating systems such as Windows®, UNIX® and OSX®.

Zsh supports the following features:

  • Configurability :

    • Shell variables: These are variables that are set, stored in the shell and available to shell applications. The set is a command that creates new shell variables and sets new values for existing shell variables.

    • alias and unalias: For more information on these commands refer to the Zsh Command Syntax section.

    • Shell functions: These are read in and stored internally. They are executed like a regular command. The following is the syntax for a shell function:

      shell_function1()
      {
      //definition of the function will go here....
      }

      The syntax for invoking the above function is

      shell_function1
    • Input files: Zsh supports the execution of commands through script files and these script files can be passed as input to the shell.

  • Execution of commands : Zsh supports the execution of both built-in commands and external programs. For further details see the Zsh Command Syntax and External Programs sections.

  • Redirection : Redirection is a function that allows the standard streams to be re-directed to a specified location. For example,

    pwd > file1

    which executes pwd, placing the output in file1.

  • Piping: The output of one command can be the input to another command without an intermediate file. For example,

    cmd1 | cmd2

    which executes cmd1 and the output of cmd1 will be the input for cmd2. The character | is known as a pipe.