- Discovering What Shell You're Using
- Understanding Shells and Options
- Changing Your Shell with chsh
- Changing Your Shell Temporarily
- Using Completion in the bash Shell
- Viewing Session History in the bash Shell
- Using Completion in the zsh Shell
- Viewing Session History in the zsh Shell
- Using Completion in the ksh Shell
- Viewing Session History in the ksh Shell
- Viewing Session History in the csh Shell
- Changing Your Identity with su
- Fixing Terminal Settings with stty
- Exiting the Shell
Using Completion in the zsh Shell
The zsh shell also offers completion but with added twists over the bash shell for the power user. Basically, though, you can type just part of a command, press , and have the Z-shell complete the command for you (Code Listing 3.10).
Code Listing 3.10. In this example, we typed only the ls command followed by cd pub and pressed the key; zsh completed the command for us.
$ ls CompleteNewProject bogus2 → ftp puppy Completed News dead.letter → mail temp Mail access files → public_html testme $ cd public_html/ $
To use completion in the zsh shell:
-
ls -l
Use ls -l to list the files in your current directory.
-
cd pub
Type in a partial command, and then press to complete the command. In this example, we typed the cd command and part of the public_html directory (truncated to pub in the example), and then pressed the key to complete it (see Code Listing 3.10).