Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Using the vi command editor z/OS UNIX System Services User's Guide SA23-2279-00 |
|
If you run the command:
or
it
tells the shell that you want the ability to edit commands the way
that you normally edit text with vi; you are set up for vi command
editing. Whenever the shell prompts you for input, it is as if the
shell puts you into vi insert mode on a new line at the end
of the history file. You can type in a new command just as you normally
would.You can also press <Esc> to enter a vi-like command
mode. When you enter command mode, you can use the usual cursor movement
commands to move around on the command line, or to move up and down
in the history file. For example:
In this way it is simple to retrieve recent commands from the history file. You can then edit them using standard vi commands. For example, you can use $ to move to the end of the line, and A to begin appending text to the end of the line. When you have edited the line to produce the command that you want to run, simply press <Enter> to run that line. As you might expect, you can use these search commands:
to search backwards and forwards through the
history file. You can edit the command line with these vi commands:
|
Copyright IBM Corporation 1990, 2014
|