| 4 | | == Zsh == |
| 5 | | |
| 6 | | === Aliases === |
| 7 | | Aliases are a nice way to customize your shell. They allow the shell to |
| 8 | | interpret a command with the exact options that you want without having to |
| 9 | | type them in all the time. You can also specify a shorter string to execute a longer command. |
| 10 | | The syntax is alias alias-name=command . If the command contains spaces, you must enclose it within quotes. |
| 11 | | Here are some examples: |
| 12 | | |
| 13 | | {{{ |
| 14 | | $> alias ll=`ls -l` |
| 15 | | $> alias f=`finger` |
| 16 | | }}} |
| 17 | | In the first example, you can get a long directory listing in any given directory by typing ll. |
| 18 | | In the second example, you can finger user jones by typing f jones . |
| 19 | | Path To set your path, or other environmental variables, you use a syntax |
| 20 | | similar to ksh or sh. The syntax is export Variable=Value . Here is an example of adding |
| 21 | | the bin directory in your home directory to your path. |
| 22 | | $> export path=($path $HOME/bin ) |
| 23 | | .zshrc |
| 24 | | |
| 25 | | The .zshrc file is exected each time you start up a new shell. This would be executed |
| 26 | | any time you logged onto a machine or statred up an xterm. |
| 27 | | .zlogin |
| 28 | | |
| 29 | | The .zlogin file is executed when your start up a new login shell. This occurs when you |
| 30 | | log onto a computer remotely or when your start an xterm with xterm -ls . |
| 31 | | .zshenv The .zshenv , is the usual place to set your environmental variable such |
| 32 | | as your path. Sample startup files can be found in /usr/local/etc . |
| 33 | | They will have the same names, only without the leading dot. |