[net.misc] csh: pre-prompt execution

dmy (01/07/83)

I too want csh to "do something" just prior to each prompt.
I'm trying to hack csh to do this (if anyone knows how to do it without
modifying the code, please let me know).
I simply check, at the point just prior to printing the prompt, for a
shell variable called "preprompt", and if it is non-null, execute it as a
command (e.g. using "system" or "execl" and "/bin/sh" or OTHERSHELL).
However, I don't (yet) understand csh's way of redirecting in/output, so I've
only been partly successful.  Does anyone know the easiest way to successfully
fork/vfork a process out of csh?  I.e. is there some single routine I can call
at just the right moment that resets the redirection?  I would like to see the
output of a simple command ...  Thanks.

--dmy--