c-shell "executable prompt" running

utzoo!decvax!harpo!seismo!dmy utzoo!decvax!harpo!seismo!dmy
Tue Jan 18 17:43:57 AEST 1983


I recently netposted my approach to providing an "executable prompt" for csh,
as well as a request for some inside info on csh.  I no longer need this info,
because I have successfully modified cshell to provide me with an arbitrary
preprompt execution.  With this, I have been able to put the time of day, the
current directory, or any other command sequence, into my prompt (i.e. just
prior to printing my prompt, my csh executes the command, if any, that it finds
in the shell variable "preprompt".)  There is potential for abuse (such as
setting that variable to a value which immediately causes an infinite cascade
of csh processes), but so far I have had no problems.

I won't netpost or distribute the source, as the csh on which my modification
is based is surely licensed.  However, I will (after a sufficient test period)
mail anyone interested a copy of my two small added routines and the single
call that invokes them (along with directions on where to put them).
(Unless I learn of some reason not to.)

--dmy-- (David Yablon, decvax!harpo!seismo!dmy, No.Vi., 83/1/18)




More information about the Comp.lang.c mailing list