Command Line Editing
The Z Shell allows you to edit the current command line. If you make a mistake, you do not need to back up to the point of the mistake and reenter the command from there or press the line kill key and start over. You can use one of the command line editors to modify the command line. You can also access and edit previous command lines stored in your history file (page 796).
The Z Shell provides two command line editors: one similar to vim (Chapter 10), and the other similar to emacs (Chapter 11). Depending on how the Z Shell is set up on your system, you may be able to use one, both, or neither of the editors.
Use the following command to set up your environment so that you can use the vi command line editor:
zsh % bindkey ...
Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.