Getting csh prompt to display the current dir.

R. L. Welsh rikki at macom1.UUCP
Wed Apr 5 03:32:47 AEST 1989


> I also cannot properly use the source command.  Does anyone out there have any
> useful suggestions for a poor user of a brain-dead C-shell?  [I say that for
...

Did you mean that "source" doesn't work right in your brain-dead C-shell or
that you weren't certain of it's use?

If it's the latter:
	source is equivalent to the "." command in sh, which means
to run a shell script in the context of the current one instead of creating
a new one.  E.g.,
	Create a short file which contains something like:

		#!/bin/csh
		setenv var new

and name it "x" and make it executable.  Then type:

	setenv var old
	x
	echo $var

"var" will still be set to "old".  But if you type:

	source x
	echo $var

"var" will now be set to "new".


In the case of the former:
	Sorry.

-- 
	- Rikki	(UUCP: grebyn!macom1!rikki)



More information about the Comp.unix.questions mailing list