Useful csh prompts?

Frederick M. Avolio avolio at decuac.UUCP
Thu Oct 10 11:40:30 AEST 1985


In article <229 at ur-cvsvax.UUCP>, bill at ur-cvsvax.UUCP (Bill Vaughn) writes:
> > A lifelong ambition of mine has been to have csh give me the current
> > time as my prompt (Ok, current time, and history number, to get greedy).
> > 
> If one has the source code one might as well do it there. 
>    ....  I was originally doing this with very cumbersome aliases
>                           ...  It works like a charm.  In fact, I had only
> added '@' to serve as a code for 'pwd'.

    I do not mean to belittle the code changes made by Bill, as they
are very nice.  I also realize that the original poster wanted the
*time* in the prompt and the only way to do this so that the current
time always shows up is to change the source code.  But many do not
have sources, and if one only wants the current directory as part of
the csh prompt, I'd use the following (which are by no means
cumbersome aliases).

                 alias cd 'cd \!* ; set prompt="[$cwd]: "'
		 alias pushd 'pushd \!* ; set prompt="[$cwd]: "'
		 alias popd 'popd ; set prompt="[$cwd]: "'



More information about the Comp.unix mailing list