Zsh

Aliases       Aliases are a nice way to customize your shell. They allow the shell to interpret a command with the exact options that you want without having to type them in all of the time. You can also specify a shorter string to execute a longer command. The syntax is alias alias-name=command. If the command contains spaces, you must enclose it within quotes. Here are some examples:

$> alias ll=`ls -l`

$> alias f=`finger`

      In the first example, you can get a long directory listing in any given directory by typing  ll. In the second example, you can finger user jones by typing  f jones.

Setting
Your Path
      To set your path, or other environmental variables, you use a syntax similar to ksh or sh. The syntax is export Variable=Value. Here is an example of adding the bin directory in your home directory to your path.

$> export path=($path $HOME/bin )

Files       There are a couple of startup files associated with zsh. They are $HOME/.zshrc, $HOME/.zshenv, and $HOME/.zlogin. Each of these files serve different purposes. The .zlogin file is executed when your start up a new login shell. This occures when you log onto a computer remotely or when your start an xterm with xterm -ls. The .zshrc file is exected each time you start up a new shell. This would be executed any time you logged onto a machine or statred up an xterm. The third file, .zshenv, is the usual place to set your environmental variable such as your path. Sample startup files can be found in /usr/local/etc. They will have the same names, only without the leading dot.


For more information on zsh one can look at:

Back to the table of contents