ksh.1 (2010 09)
k
ksh(1) ksh(1)
M-p Push the region from the cursor to the mark on the stack.
kill (User-defined kill character, as defined by the stty (1) command, usually
ˆG or @.) Kill
the entire current line. If two kill characters are entered in succession, all subsequent
consecutive kill characters cause a line feed (useful when using paper terminals).
ˆY Restore last item removed from line (yank item back to the line).
ˆL Line feed and print current line.
@ (Null character) Set mark.
M-space (Meta space) Set mark.
ˆJ (Newline) Execute the current line.
ˆM (Return) Execute the current line.
ˆP Fetch previous command. Each time
ˆP is entered, the next previous command in the
history list is accessed.
ˆN Fetch next command. Each time
ˆN is entered the next command in the history list is
accessed.
M-< Fetch the least recent (oldest) history line.
M-> Fetch the most recent (youngest) history line.
ˆRstring Reverse search history for a previous command line containing string . If a parameter of
zero is given, the search is forward. string is terminated by a Return or Newline.If
string is preceded by a ˆ, the matched line must begin with string.Ifstring is omitted,
the next command line containing the most recent string is accessed. In this case a
parameter of zero reverses the direction of the search.
ˆO Operate - Execute the current line and fetch from the history file the next line relative to
current line.
M-digits Define numeric parameter. The digits are taken as a parameter to the next command.
The commands that accept a parameter are ˆF, ˆB, erase , ˆC, ˆD
, ˆK, ˆR, ˆP, ˆN, ˆ],
M-., M-_, M-b, M-c, M-d, M-f, M-h, M-l, and
M-ˆH.
M-letter Softkey. User’s alias list is searched for an alias by the name
_letter and if an alias of
this name is defined, its value is inserted on the input queue. This letter must not be one
of the above meta-functions.
M-. The last word of the previous command is inserted on the line. If preceded by a numeric
parameter, the value of this parameter determines which word to insert rather than the
last word.
M-_ Same as M-..
M-* Attempt file-name generation on the current word.
M-ESC File-name completion. Replaces the current word with the longest common prefix of all
filenames matching the current word with an asterisk appended. If the match is unique,
a / is appended if the file is a directory and a space is appended if the file is not a direc-
tory.
M-= List files matching current word pattern as if an asterisk were appended.
ˆU Multiply parameter of next command by 4.
\ Escape next character. Editing characters, the user’s erase, kill and interrupt (normally
^?) characters can be entered in a command line or in a search string if preceded by a \.
The \ removes the next character’s editing features (if any).
ˆV Display version of the shell.
M-# Insert a # at the beginning of the line and execute it. This causes a comment to be
inserted in the history file.
Vi Editing Mode
There are two typing modes. Entering a command puts you into input mode. To edit, the user enters
control mode by pressing ESC and moves the cursor to the point needing correction, then inserts or
deletes characters or words. Most control commands accept an optional repeat count prior to the
20 Hewlett-Packard Company − 20 − HP-UX 11i Version 3: September 2010