Csh prompt

News system owner ID news at bbn.COM
Fri Feb 10 01:43:51 AEST 1989


>  In article <739 at umb.umb.edu> pme at umb.edu (Paul English) writes:
>  >Since this type of thing usually makes your prompt so long that you
>  >usually tend to ignore it, why have it there in the first place? If
>  >you really need an easy way of reminding yourself where you are, you
>  >could do something like the following to make it easy to get this info
>  >on demand:
>  >
>  >    alias . echo `hostname`: `dirs`
>  >
>
>  I agree. While my host names are short so they are OK to embed in
>  the prompt, I would find having the full dir pathname in the prompt
>  very annoying. I agree it's better to just make it quick to
>  find out where you are.
>

My solution is to put only the last part of the directory into the
prompt: that means i don't absolutely know where i am (there's more
than one .../etc), but usually i only want to disambiguate one of a
limited number of distinct possibilities. If i have to run another
command to find out, i tend to just not do it. I'm open to suggestions
for a nicer way to do it:

alias cd 'cd \!*; set here=`pwd`; set prompt = "\! ..$here:t> "'
alias pushd 'pushd \!*; cd .'
alias popd 'popd \!*; cd .'


........................................
Sean Boisen -- sboisen at bbn.com
BBN Systems and Technologies Corporation, Cambridge MA
Disclaimer: these opinions void where prohibited by lawyers.


Sean



More information about the Comp.unix.wizards mailing list