home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
CLE_OS2.ZIP
/
CLE.TXT
< prev
next >
Wrap
Text File
|
1988-06-26
|
12KB
|
345 lines
CLE
Users' Guide
Peter Coates and Associates
Whincroft
Upper Colquhoun Street
Helensburgh
G84 9AQ
1801 Rainbow Av
Laramie
WY 82070
U S A
Telephone Number
(+44) 436 78764
CLE Users Guide
Contents
Introduction Page 1
Keystrokes Page 2
Modes Page 2
More About History Page 2
Line Length, Tabs and Control Characters Page 3
Examples Page 3
Installation Page 4
CLE is Shareware. That is, there is no obligation to pay
anything for it. On the other hand, if you use it and find it
useful you might feel better if you made a contribution.
Rather like supporting your Public Television station.
A contribution of $40 or £25 is suggested.
-i-
CLE Users Guide
Introduction
CLE (Command Line Editor for OS/2) is utility for OS/2
which allows more natural recall and editing of command than
using the indigenous F1 - F6 key stroke editing.
The way command line editing works with CLE is more
like the way you edit a document using DisplayWrite or other
word processor. The keystrokes used are Left Arrow,
Right Arrow, Ctl Left Arrow, Ctl Right Arrow, Home, End, Ins,
Del, Backspace, Ctl End, Esc.
CLE remembers a substantial number of previous
commands, the exact number depending on how long they are, but
typically dozens, and you can recall and see them by scrolling
up or down through them using the Up Arrow and Down Arrow
keys. It is even possible to recall commands by initial
letter. Pressing F1 followed by a letter recalls the most
recent command issued that started with that letter. CLEOS
remains in History mode, indicated by a full-block cursor,
until F2 is pressed or until CLE can't find a command
starting with the character given. Thus the sequence F1 d
recalls the last command starting with d. Pressing d again
recalls the one before that, and so on.
The other function keys F3 to F12, and the shift,
control and Alt function keys can have strings assigned to
them so that pressing F3, for instance, could be equivalent to
typing "dir/w *.doc".
Invoking CLE
CLE is invoked by typing the command
[C:\] cle fn="string" ...
where fn is the name of a function key and string is the
string it is to represent. Fn may be any of f3 to f12 for
function keys 3 to 12, s1 to s12 for shift F1 to shift F12, c1
to c12 for control F1 to control F12, or a1 to a12 for alt F1
to alt f12. Case is not significant in the name of the
function key. That is f4 is equivalent to F4. The string to
go behind the function key may be up to 15 characters long,
and may contain spaces and tabs. If the string does not
contain spaces or tabs, then it need not be enclosed in
quotes.
The strings represented by function keys may be added,
changed or removed at any time after CLE has been invoked by
reissuing the CLE command with new parameters. To stop a
function key representing a string simply specify a zero
length string. For example the following command causes
further uses of F5 to have no effect:
[C:\] cle F5=
The assignment of strings to function keys is global to
all sessions which are using CLE.
CLE cannot be removed from a session without closing
the session using the EXIT command and restarting it using the
Program Selector.
-1-
CLE Users Guide
Keystrokes
Cursor movement commands
■ Left Arrow moves the cursor left one character position
without deleting.
■ Right Arrow moves the cursor right one character
position.
■ Ctl Left Arrow moves the cursor left to the beginning
of the previous word.
■ Ctl Right Arrow moves the cursor forward to the
beginning of the next word.
■ Home moves the cursor to beginning of the command line.
■ End moves the cursor to the end of the command line.
Editing Commands
■ Insert puts you in insert mode if you are currently in
replace mode and vice versa. Insert mode is indicated
by a half-block cursor, replace mode by an underline
cursor.
■ Back Space deletes the previous character, that is the
character immediately to the left of the cursor.
■ Delete deletes the character the cursor is on.
■ Ctl End deletes all text to the right of the cursor.
■ Esc deletes the whole of the current input line.
History Commands
■ Up Arrow scroll up one command.
■ Down Arrow scroll down one command.
■ F1 enters history mode to recall by initial letter.
History mode is indicated by a full-block cursor,
■ F2 reverts to normal editing mode.
Modes
■ Replace mode is indicated by an underline cursor. In
replace mode a character typed replaces the character
under the cursor.
■ Insert mode is indicated by a half-block cursor. In
insert mode characters typed push existing text to the
right to make room for the new characters.
■ History mode is indicated by a full-block cursor. In
history mode characters typed are used as initial
letters to search for commands in the history.
More About History
CLE does not only remember the command history for the
command line processor, but also will remember lines typed in
for other programs. Any program that accepts lines of text as
input, as opposed to single characters, will gain from this
history facility. Programs which read single characters and
act on them straight away will not gain.
What-you-see-is-what-you-get (WYSIWYG) word processors will
not gain. The program histories will not be recalled when in
the command prompt as the remembered command lines are tagged
with a program identifier.
-2-
CLE Users Guide
Line Length, Tabs and Control Characters
A command line can be up to 127 characters long. This
can include tabs and other control characters. Tabs are
expanded to display as spaces, but are treated as single
characters for editing purposes. Other control characters are
displayed as a pair of characters, for instance Ctl B is
displayed as ^B. Again this is treated as a single character
for editing. As input lines can be 255 characters long a
single input line can take up several screen lines. Input
lines are wrapped around at the edge of the screen. The best
thing to do is to ignore the line wrapping as it doesn't
affect the content of the command. The editing keystrokes
such as Left Arrow, Right Arrow, Backspace, etc. work quite
happily over the edge of the screen.
Examples
Suppose you want to see the directory information for a
file named media.pln. To get this information you could type
the following command:
[C:\] dir media.pln
This command (dir media.pln) is also saved as the last entry
in the command history. If you want to repeat the command,
just press two keys: Up Arrow and Enter.
CLEOS displays the repeated command on the screen when you
press Up Arrow as shown below
[C:\] dir media.pln_
Note that the underline is your cursor. When you press
Up Arrow, CLE copies the last entry in the history to the
command line; pressing Enter then sends the command line to
the command processor for execution, and makes a new history
entry.
If you want to display information about a file
media.tpl, you can use the history. Press Up Arrow as before
to copy the history entry to the command line. You can now
edit the line:
Press Backspace
[C:\] dir media.pl_
Press Back Arrow
[C:\] dir media.p_l
Press Back Arrow
[C:\] dir media._pl
Press Ins
Note that the cursor is a half block
[C:\] dir media.■pl
Press t
[C:\] dir media.t■pl
Now you can press Enter to run the command. The command line
(dir media.tpl) is now the last entry in the history.
-3-
CLE Users Guide
Now, assume that you want to run the following command:
[C:\] type media.tpl
To do this, you want to recall the last history entry and edit
it again:
Press Up Arrow
[C:\] dir media.tpl_
Press Home
[C:\] _dir media.tpl
Press t y p
[C:\] typ_media.tpl
Press Ins e
[C:\] type■media.tpl
Then press Enter to run the command.
Installation
CLE consists of two files, CLE.EXE and CLEDIT.DLL.
CLE.EXE need to be put into a directory on your search path
(see the PATH command). CLEDIT.DLL must be on your libpath
(see the LIBPATH statement in CONFIG.SYS).
-4-