30-APR-88
Read the warnings below before you try to execute. Needs ARP 1.1.
Here are a couple of nice improvements to csh 2.07M. The new features are:

    File name completion.
	Assume that the following files are in the current directory:
		foo.c bar.c bar.o adir
	where adir is a directory. Enter the following partial command
	line to csh
		echo fo
	then hit TAB (the cursor should be immediately after the string "fo").
	csh should now expand this to
		echo foo.c

	If you type
		echo b
	and then hit TAB, Csh will expand this to
		echo bar.
	Now try hitting CNTRL-D. Csh should now list
		Directory of your-current-dir
		 bar.c bar.o

	If you type
		echo ad
	and then hit TAB, you should get
		echo adir/

	File name completion is most useful on fast devices, like a ram disk.

	Now, as you noticed above csh would not expand b to bar.c because
	there was a file bar.o in the directory. You can tell csh tha it
	should ignore files with certain suffixes. This is done by setting
	the shell variable 'fignore'.
		set fignore .o
	tells csh to ignore files ending in '.o'. 'b' will now expand to
	'bar.c'.
		set fignore .info,.o
	will cause csh to ignore files ending in '.o' and '.info'.

	Note: the parsing done on the arguments before the completion is
	very simple minded. The parser does not understand about spaces in
	file names.
	
    Argument execution.
	A string on the command line surrounded by grave accents will be
	executed and the result of the execution will be substituted for
	the the string.
	
	Example:
	    I have enclosed a command called sets (sets is the main reason
	    that I added the argument execution feature).
		sets * -d *.zoo
	    will list all files except those that end with the suffix '.zoo'.
	        rm `sets * -d *.zoo`
	    will remove all files except those that end in '.zoo'. Neat, huh?

	The total size of the command line is currently limited to 256 bytes.
	I consider this to be a very serious restriction.

	
Time for some warnings and disclaimers.

    I have converted the csh back to Lattice. The source diffs that I have
    provided are what you should need to put these facilities into csh under
    MANX, but you may have to do some editing. I have not tried to compile
    this under MANX but there should not be any serious problems.

    I can provide the complete diffs for Lattice if anyone is interested.

    The binary that I have provided is intended as a demonstration of how nice
    these features are, to encourage you to put them into other shells,
    including future csh's.

    The binary has been generated by the Lattice compiler. I have not done
    a whole lot of testing on it so some bugs may remain. I have used ARP 1.1,
    the binary will not work without it.

    A note about
	run
   	The binary runs commands by calling SyncRun(). SyncRun() does not
	handle run (the old AmigaDOS BCPL command). However, it does handle
	    arun
	I usually copy arun to vd0:c/run.
	    copy sys:c/arun vd0:c/run

	Another caveat: redirection does not work together with run.


					Johan Widen
				USENET: jw@sics.se
