ksh is another shell that offers command completion. You type part of a command, press twice, and ksh completes the command for you (see Code Listing 3.12). Using command completion in ksh isn’t as easy as it is in zsh or bash, but the results are the same.
$ ls Complete NewProject bogus2 files → public_html testme Completed News chat.conf → ftp puppy Mail access dead.letter → mail temp $ cd pub^[^[ ksh: pub: not found $ set -o emacs $ cd public_html/ $ |
1. | |
2. | ls -l Use ls -l to list the files in your current directory. You do this so you know which directory (public_html) you can change to in step 3. |
3. |
✓ Tips
If you don’t have ksh installed on your system, you might also look for pdksh, which is a freely distributable and nearly identical version of ksh.
You can also type in set -o vi to use vi commands (instead of the command given in step 1). We’ve found, though, that this isn’t as intuitive or effective, so we recommend the emacs mode.
See Chapter 4 for more information about editors.
If you use ksh, you’ll probably want to add the set -o emacs command to your personal configuration files so you don’t have to manually enter the command in each session. See Chapter 8 for the specifics of editing configuration files.