[net.micro.amiga] assign, Matt's shell, and Lattice C

dwd@ttrda.UUCP (Dave Dykstra ) (08/01/86)

I had been trying to make an alias for Matt Dillon's shell which would 
do a compile with Lattice C using ram: for the intermediate file.  I 
had a hard time figuring out how to get lc2 to put the final output 
file back in the current directory.  I did figure out a way, and here 
it is.  

I noticed in Byte magazine in the "Best of BIX" that if you assign 
something to a null string it gets assigned to your current directory.  
In Matt's shell you have to escape the double quotes to keep it from
interpreting them.  In an alias you have to escape the escapes.

I have included the aliases I use in my ".login" file below.  I've 
also included aliases to pop back to your previous directory.  Note 
that assignments are global to all windows so it has side effects.  It 
would be better to set a local variable but there is no way to get at 
the current working directory from the shell, at least in the version 
I've got.  There isn't even a pwd (!).  It would be nice to have a 
"$cwd" or something. 

	- Dave Dykstra, ihnp4!ttrdc!ttrda!dwd
	  AT&T (Teletype), Skokie, IL

#----------- Cut here --------
alias cc    "%z assign curdir: \\\"\\\";foreach y ( $z ) \"lc1 -idf1:include/ -idf1:include/lattice/ -oram: $y;lc2 -s -v -ocurdir: ram:$y \""
alias ld    "%var alink faster df0:lib/lstartup.obj+$var library df0:lib/lc.lib+df0:lib/amiga.lib to a"
alias chdir "%var cd $var;assign olddir: curdir:;assign curdir: \\\"\\\""
assign curdir: \"\"
alias pop   "chdir olddir:"