home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
001-099
/
ff081.lzh
/
Cled
/
CLED.doc
< prev
Wrap
Text File
|
1987-06-30
|
12KB
|
275 lines
CLED v1.4
(Command Line EDitor)
May 21, 1987
by
Pat R. Empleo
April 21, 1987
============================= INTRODUCTION =================================
CLED is a simple command line editor which allows you to edit your commands
before and after they are processed by your Amiga. It uses the arrow keys and
simple <CTRL> sequence keystrokes to position the cursor and to perform editing
tasks. It also keeps a history of past commands for recall, editing, and
resubmission.
It currently requires roughly 13.5K of your precious RAM.
The sole purpose for creating CLED is to provide command line editing capability
to the Amiga CLI environment. It is not intended to be a full-blown shell which
provides additional commands such as aliases or macros. In fact, there are
currently only four such "internal commands" in CLED.
============================== RESTRICTIONS ================================
Like every man-made thing on this planet, CLED (especially CLED) is not perfect.
Still, CLED is very useful in its present form, especially if you're use to
operating systems such as VMS and/or are a lousy typist like myself.
The following limitations (that I've found so far) are discussed in order of
severity ...
1. AmigaDOS EXECUTE command:
This is the big one!! Typing "EXECUTE filename" on the CLED command line
will not work. There is currently no script facility in CLED. In order to
execute script files, you must type "RUN EXECUTE filename". This implies that
some DOS commands and other programs evoked from within the script file may
not work as expected. Specifically, any program requiring input from an
interactive CLI will not work. Also, the DOS commands, CD and PATH, will be
valid only for the non-interactive CLI that was started and only until it
terminates. If you do type "EXECUTE whatever", then the command will not
execute until you have exited CLED. Simply exit CLED if your script file
does not execute correctly.
I toyed with the idea of adding script capablility to CLED, but the idea of
duplicating what the AmigaDOS EXECUTE command does in a "normal", interactive
CLI window horrified me! All I want is to edit the command line!
2. The AmigaDOS redirection operators, < and >, are not supported, so typing
commands such as "dir >prt:" or "info >filename" won't work. However, you can
get around this by typing "run dir >prt:" or "run info >filename" or
"run whatever <input >output", so long as the process you run doesn't
require any input from an interactive CLI.
3. Currently, CLED does not allow "stacking of commands".
4. AmigaDOS Template feature:
Trying to display the templates of AmigaDOS commands won't work. For example,
typing "DATE ?" or "DIR ?" will only get you a "Bad arguments" message.
5. CLED PROMPT command:
The CLED PROMPT command does not have a %n feature like the AmigaDOS version.
Typing "PROMPT whatever" on the command line will evoke the CLED PROMPT
(see the CLED COMMANDS section). Typing "RUN PROMPT whatever" will evoke the
AmigaDOS PROMPT, however, your new prompt will not appear until you've exited
CLED.
6. AmigaDOS RUN command:
Using the RUN command in the form "RUN command+command+command,,,,,,,,,"
doesn't work. Does anyone ever use this????
7. CLED runs only under 1.2 of the Amiga operating system.
8. CLED keeps only the last 30 commands. I'll probably add a command so you can
change the limit of the history stack.
9. Currently, CLED will accept no more than 20 arguments and no more than 255
characters on the command line.
10. CLED is always in insert mode. I doubt if I'll add overwrite capability
------ I NEVER had the need.
================================= USAGE ====================================
Format: cled [string [color]]
Place CLED in your C: directory or define a PATH to it.
CLED is invoked by typing "cled" at the CLI command line, with or without
arguments. The optional arguments allow you to specify a prompt and its color
when CLED starts up (see CLED COMMANDS - prompt). Don't start the program by
typing "run cled" or thereafter, your display will become extremely confusing.
If CLED is to be included in the startup-sequence script file, it should be the
last statement in the file or else commands that follow will not be executed
until CLED is exited.
=========================== EDITING COMMANDS ===============================
Keystrokes Action
---------- ----------------------------------------------------------------
Up-arrow Scrolls up through the previous commands (history) entered on
the command line
Down-arrow Scrolls down through the previous commands (history) entered on
the command line
Left-arrow Moves cursor left through the command string
Right-arrow Moves cursor right through the command string
<DEL> Forward deletes character on the command line
Shift-Left- Moves cursor to the Beginning of the command string
Arrow or ^B
^D Delete from cursor to end of command line
Shift-Right- Moves cursor to the End of the command string
Arrow or ^E
<BS> or ^H Backward deletes character on the command line
<HELP> Displays history of the commands entered on the command line.
If a history number (displayed next to the command string) is
entered on the command line, the corresponding command string
will be placed on the command line for resubmittal or editing
<RET> or ^M Submits the command which the cursor is on for processing; the
cursor does not have to be at the end of the command string. If
the string is a history number, its corresponding command will
be placed on the command line
^W Move forward to next word
^X or ^U Erases the command line. "Clicking" the window's resizing
gadget will also clear the line.
^key Clears the screen. Pressing any valid ^key combination other
than the ones discussed in this document will clear the screen.
============================ CLED COMMANDS =================================
Command Action
------- ----------------------------------------------------------------
<TAB> Executes the commands corresponding to a list of history numbers
entered at the command line. The numbers must be separated by
spaces.
Format: n1 n2 n3 ... nn<TAB>
Parameters: n - History numbers; pressing the <HELP> key
will display a history of commands, and
high-lighted to the right are their
corresponding numbers. The numbers can
listed in any order desired
<TAB> - Pressing the <TAB> key or typing ^I
The cursor need not be at the end of the
line
Example: 2 25 6 8 1<TAB>
2 2 2 3 3 29 1 1 1 3<TAB>
cd This command duplicates the action of the Amiga DOS CD
(change directory) command. Typing the command with no arguments
will cause CLED to use the CD command found in your C:
(or whatever) directory. This assumes that your change directory
command is named CD, of course.
The only reason it's a built-in function is because a certain
Russell Leighton kept on griping about having to click into
the system requestor ("Insert Disk") which came up whenever you
CDed to a new directory from the old directory, and the old
directory's disk was not in a drive. Well, he's right, it was a
pain!
prompt Changes the prompt and optionally its color.
Format: prompt string [color]
Parameters: string - New prompt string; if the new prompt has
imbedded spaces, then the string must
be enclosed in quotes. Escape sequences
can be included in the string, but only
at the front; this allows for further
customizing of your prompt. On CLED
startup, the default prompt is ">>- ".
color - Color of the prompt where color is one
of the following numerical values:
1 WorkBench foreground color
2 WorkBench gadgets color
3 WorkBench cursor color
This parameter is optional. If no value
is given, the current color is used.
The history numbers will also be
displayed in the current color. On
CLED startup, the default color is 3.
Examples: prompt "Hi There! "
prompt "$ " 2
prompt "<ESC>[3;32;40mYes Master? " 3
exit Deallocates any allocated memory and exits to the system CLI.
Format: exit
Parameters: n/a
Example: exit (Simple huh??!?)
================================ REVISIONS ===================================
v1.4 (05/21/87) CD, internal change directory command was added
v1.3 (05/01/87) CLED now works correctly when CHANGETASKPRIed higher than 4
v1.2 (04/29/87) ^E bug fix
v1.1 (04/24/87) Added ^D, delete from cursor to end of command line;
Added ^W, advance cursor to next word;
v1.0 (04/22/87) Initial Release
================================= NOTES ====================================
CLED was compiled and linked using MANX Aztec C68K, v3.4a
If you have any questions, suggestions, flames, or find any bugs, you can
contact me during my normal slave hours of 8:00 AM to 4:00 PM at (408)778-4644
(voice only, sorry), or leave a message on AMIC, (707)579-0523.
Pat R. Empleo
May 21, 1987
============================== DISTRIBUTION ================================
This program is placed in the PUBLIC DOMAIN. You may do as you wish with it
(which isn't much) except sell it, but please keep the distributed ARCed file
intact, and do not remove this documentation (or my name for that matter).
If you fail to abide with the above, may the Great GURU curse your bits forever,
or at least until you croak from radiation from your CRT!!!