01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

KSH ( 1 ) KSH(l)<br />

Command Re-entry.<br />

The text of the last lllSTSIZE (default 128) commands entered<br />

from a terminal device is saved in a history file. The file<br />

$HOME/ .history is used if the HISTFILE variable is not set<br />

or is not writable. A shell can access the commands of all interactive<br />

shells which use the same named lllSTFILE. The special<br />

command fc is used to list or edit a portion of this file. The portion<br />

of the file to be edited or listed can be selected by number or<br />

by giving the first character or characters of the command. A single<br />

command or range of commands can be specified. If you do<br />

not specify an editor program as an argument to fc then the value<br />

of the parameter FCEDIT is used. If FCEDIT is not defined<br />

then /binfed is used. The edited command(s) are printed and reexecuted<br />

upon leaving the editor. The editor name - is used to<br />

skip the editing phase and to re-execute the command. In this<br />

case a substitution parameter of the form old=new can be used<br />

to modify the command before execution. For example, if r is<br />

aliased to 'fc -e -' then typing 'r bad=good c' will re-execute<br />

the most recent command which starts with the letter c, replacing<br />

the string bad with the string good.<br />

In-line Editing Options.<br />

Normally, each command line entered from a terminal device is<br />

simply typed followed by a new-line ('RETURN' or 'LINE<br />

FEED'). If any of the options emacs, gmacs, or vi is active, the<br />

user can edit the command line. To be in any one of these edit<br />

modes set the corresponding option. An editing option is<br />

automatically selected each time the VISUAL or EDITOR variable<br />

is assigned a value ending in one of these option names.<br />

The editing features require that the user's terminal accept<br />

'RETURN' as carriage return without line feed and that a space<br />

(' ') must overwrite the current character on the screen. ADM terminal<br />

users should set the "space-advance" switch to 'space'.<br />

Hewlett-Packard series 2621 terminal users should set the straps<br />

to 'bcGHxZ etX'.<br />

The editing modes implement a concept where the user is looking<br />

through a window at the current line. The window width is the<br />

value of COLUMNS if it is defined, otherwise 80. If the line is<br />

longer than the window width minus two, a mark is displayed at<br />

the end of the window to notify the user. As the cursor moves<br />

and reaches the window boundaries the window will be centered<br />

about the cursor. The mark is a > (

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!