| Version 1.9 Build 1556
|
|
Next: The Glish Client Library
Up: The Glish 2.7 User Manual DRAFT
Previous: Debugging Glish Scripts and Clients
Command Line Editing
This chapter describes the optional command line editing feature
of Glish. Command line editing is implemented using a modified
version of the original editline library.
14.1(See the editline/README and editline/COPYING
distribution files full information.) This library was written
by Simmule Turner and Rich Salz, and was modified to work within
Glish's asynchronous event constraints.
Command line editing allows you to re-execute previous commands, fix
problems with the current command, or search for a
previous command matching
a particular substring. These operations are performed based on
emacs-like control characters and can be used any time you
enter a command. Table 14.1 summarizes
the editing commands. The notation C-<CHAR>
means that the character
<CHAR>
is typed while the CONTROL key is held down. So
C-b is known as control-b. The notation M-<CHAR>
means that the META key is held down while <CHAR>
is typed or
the ESCAPE key is pressed before pressing <CHAR>
. So
M-b is known as meta-b or escape-b. In addition, BACKSPACE
represents the ``backspace key'', DELETE represents the ``delete key'',
RETURN analogous to the ``return key'', and UP-ARROW, DOWN-ARROW,
LEFT-ARROW, and RIGHT-ARROW analogous to the up, down, left, and right
keys common on most keyboards.
These commands become relatively natural with use, and are a great aid
when working with the CLI. If you are not interested in all of the
control characters, backspace, delete, and the arrow keys perform as expected,
and should provide most of what is needed.
Table 14.1:
Command Line Editing Commands
Command |
Action |
C-p or UP-ARROW |
get the previous command |
C-n or DOWN-ARROW |
get the next command |
C-a |
go to beginning of line |
C-e |
go to end of line |
C-b or LEFT-ARROW |
move back (to the left) one character |
C-f or RIGHT-ARROW |
move forward (to the right) one character |
C-d |
delete the current character. Note C-d on an
empty line exits Glish. |
C-h or BACKSPACE or DELETE |
delete the
previous (to the left) character |
C-k |
kill from the current character to
the end of the line |
C-y |
yank back any previously killed character
before the current character |
C-l |
redisplay the current line |
C-] <CHAR> |
move to the single
character <CHAR> |
C-t |
transpose current and previous character |
C-r |
search for a string. Enter the string followed by
RETURN when prompted with Search:.
Just pressing return when prompted uses the last
search string. |
M-b |
move back (to the left) one word |
M-f |
move forward (to the right) one word |
M-d |
delete from the current position to the end
of the word |
M-l |
toggle to lower case from the current position
to the end of the current word |
M-u |
toggle to upper case from the current position
to the end of the current word |
M-< |
get the first history line |
M-> |
get the last history line. This is
often used to restart a search. |
M-C-h or M- BACKSPACE or M- DELETE, |
delete from the current position to the beginning
of the current word |
M-w |
copy from the current position to the beginning
of the line to the kill buffer for a later yank |
|
Next: The Glish Client Library
Up: The Glish 2.7 User Manual DRAFT
Previous: Debugging Glish Scripts and Clients
  Contents
  Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2006-10-15