This program is a prerelease version for a future AMIGA product that
will someday emulate the major capabilities for the UNIX* C-Shell.

This program is NOT yet a Computerverse product!!
Computerverse will not assume any responsibility for its use.
This version is only for betasite testing and examination, and is
prone to stack crashes as most prereleases are.
This is not a "port" from anything at all, with no cross-testing.
Please be sure to examine the "known bugs" section at the end.

Due to a 32K size constraint, this program does not have FULL csh
emulation capability. This version does NOT have pipes, job control,
or filename expansion other than what amigados provides.

Multiple commands per line are delimited by a semicolon (;).
Both single and double quotes are parsed last, and can be used
to group command arguments. a "#" character delimits comments.
EOF is (CTRL-ALT-minus(on the keypad)).
Tabstops are programmable and can be backspaced.
The "del" key will delete the current line.

EXPRESSIONS:

The ASH has a built-in expression evaulator that can perform
mixed string, numeric, and boolean operations. Your best bet
is to experiment for awhile with the following operators:

	operator       type     associativity  what?
	()             any       -->           Infix parenthetic op
	!              bool      <--           logical uniary "not"
	* / %          numeric   <--           multiply,divide,mod
	+ -            numeric   <--           addition,subtraction
	< <= > >=      string    <--           comparison
	== !=          string    <--           equal, different
	&&             bool      <--           logical "and"
	||             bool      <--           logical "or"
	=              any       <--           assignment
	,              any       -->           seperator

There is a known bug with unary "-", please bypass by using "0-e".


INTRINSIC COMMANDS:

if	expression
(statements)
else
(statements)
endif

	The if/else/endif group will execute the enclosed	statements
	if the expression is a logical "true".	the optional "else"
	instruction flips the logical state.

while expression
(statements)
break
continue
end

	The while/break/continue/end group will execute the
	statements as long as the expression is "true". The break
	statement will force the loop to end immediatly. the
	"continue" statement will force to loop to go back to the
	while statement. The "end" statement will cause the loop to
	go back to the while statement and reevaulate, if the while
	expression is false, control will branch to the statement
	following end.

foreach varible expression expression expression expression ...
(statements)
break
continue
end

	The foreach statement will loop once each expression in the
	list and also assign the result of the expression to the
	defined varible name. "break", "continue", and "end" are the
	same as for the while group.

repeat n statement

	The repeat instruction will execute the statement following
	it on the same line n times.

goto n

	The goto instruction will branch to prompt #n and continue
	execution.

test expression "then" statements

	The test statement will execute the statement-list if the
	expression is "true". It differs from the if statement in
	that only the statement list after the seperator "then" are
	executed once. no "endif" is required.

exit

	The exit statement terminates the CLI. The commands in the
	file ".ashexit" are executed if the file exists.

set value="expression"

	The set command is used to assign varibles to values. Some
	symbol names are reserved by the ASH itself and are as follows:
		tabstop   The number of columns for tab expansion.
		baud      The baud rate for the built-in terminal emulator.
		status    The return code of the previous command.
		$.prompt  The prompt string for ASH.
		$h        The current history number.
		$level    The current "level" of "if","while","foreach".			To display the curretly set varibles, type just "set". 
	To display the "hidden" set varibles used internally,
	type set -a. Once a varible is set, it can be accessed by
	preceeding it with a "$". a "$#" prefix will return "true"
	if the varible exists. Subscripting is also allowed as
	$label[n]; here are some examples:
		set a="1", b="a b c";echo $a,$b[2]

alias fakename "command"

	The "alias" command are similar to set, but are referenced
	differently, they do not need a preceeding "$" but do need
	to be defined in column 1 on the input line. aliases are
	used for command substitution. Argument passing is done by
	"$n" to pass argument number n. using "$*" will pass all
	arguments.

unset label
unalias label

	These commands are used to undefine any previous definations.

history

	The "history" command displays the last (currently 46)
	commands in the "history loop". History substitutions can be
	performed by using "!n", where n is the prompt number. "!!"
	is the last command, indexing is also allowed as "!n[m]",
	"!n$" or "!$" will return the last field of the referenced
	prompt line.

source file arg1 arg2 arg3 ...

	The source command will execute commands from the given file.
	Currently, sources should not be nested more than twice.
	Arguments given to source will be referenced in the source
	file as $0,$1,$2,$3,...
	When the ASH starts-up it will automatically source the file
	.ashinit and upon exit it will source .ashexit.
	The arguments given to ASH (i.e. targv[]) will be passed to
	the terminal sourcing as $1 $2 $3 just as arguments are
	passed to a source file. If ASH is invoked with just a
	single argument, it will just source that one file without
	".ashinit" or ".ashexit".

cat	-options file1 file2 ...

	The cat command is similar to the "type" command except that
	it is intrinsic. The followiing options may be given:
		-h display a header for each file.
		-m display in interactive (more) mode, with page stops.
		-s display all non-printing characters in hex.
	BUGS: This command is much slower than "type".
	cat -s sometimes crashes with large binaries, use "type opt h"

echo	-n expression expression ...

	The echo command prints the list of expressions. If given
	the -n flag, no carrige return will be printed at the end.

eval expression,expression ...

	The eval command will evaulate the expression and print the
	result. typing "echo 2*3" will print "2*3"; typing eval
	"2*3" will print "6".

# comment
	The "#" is used to seperate comments and could also be
	classified as a command

clear
	"clear" sends a control-L to the screen, which clears it.

beep
	"beep" sends a control-G to the screen, which "blinks" it.

remote filename

	This is the built-in terminal emulator. If a file is given
	then capturing will go to the file. capturing is initially
	off, typing a "control-x" will flip its status. To exit from
	remote, type a control-shift-minus(on the right keypad).

help

	The help command will show a listing of the currently
	implemented intrinsic commands.

reset

	turns off the 8'th bit if your output to the screen is garbled

gets	varible

	The "gets" command will pause and wait for the user to enter
	a string; the varible mentioned will be then set to the
	entered string.





KNOWN BUGS:

1) The flow control stuff ("while","foreach","continue","break","end")
dont like con: input. Foreach currently does not like to be nested.
Also, remember to pair while/foreach with end, if with endif;
and not vice-versa.

2) sorry, pipes and IO redirection and job control are not in this
release, although the parser knows about them. IO redirection is
currently only what the amigados "Execute" call gives you.

3) The "cat" intrinsic is unacceptably slow. cat -s hates binaries.

4) the "remote" (terminal emulator) prefers to capture files in ram:
   "remote" needs some "time tweeking"

5) "goto" does not work right, you should avoid goto's anyway.

6) "history" prefers "!n[$]" instead of "!n$". please dont ask why.

7) weird noise from the memory allocator/deallocator.

8) too bad "WaitForChar" doesn't know about the ser: device.

9) "source" crashes after >2 levels, it needs a lot of stack space.

10) I'm working on the filename expansions goodies ASAP;
    for now use the Amiga's format (you have to quote the '#').

11) You cannot break out of a while/foreach loop until I get
    info on signals. My "WaitForChar" kludge currently loses bytes.

Hopefully, I will have these bugs fixed before you are reading 
this memo; I have decided to "shipit" today as-is, for a "free preview".
If you have any ideas, comments, or know where I can get a hold
of ANY documentation to fix the bugs, then please contact me at
Computerverse.
Thorn
