Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!killer!ninja!sys1!techsup!cpe!tif
From: tif@cpe.UUCP
Newsgroups: comp.sources.d
Subject: Re: csh prompts
Message-ID: <2000005@cpe>
Date: 24 Jun 88 13:34:00 GMT
Lines: 37
Nf-ID: #R:MISTERDATA/afs/cs.cmu.edu/bsd4.3/ibm032/omega/usr/misc/.X11tra/lib/awm/bitmaps:(120) %
>
>Cute, huh? Oh well, I think its worth it, even if my prompt *does* exceed
>one screen width :-) (After all, that's what 132 column Xterm windows are
>for, right? hee hee)
Well, I was gonna stay out of this but I have my own solution to this.
Those long prompts are really obnoxious at lower baud rates.
Chances are you had a pretty good idea where you were, you just needed
a hint. The last two components are probably sufficient. My prompt
would only print
awm/bitmaps:120
If you're interested here's mine:
alias cd 'chdir \!*; set cwd=`pwd`;\\\
set head=$cwd:h; set prompt="$head:t/$cwd:t:\! "'
I suppose if you wanted three components you could use (untested)
alias cd 'chdir \!*; set cwd=`pwd`;\\\
set head1=$cwd:h head2=$head1:h;\\\
set prompt="$head2:t/$head1:t/$cwd:t:\! "'
P.S. add "cd ." to the end of .cshrc to initialize it. I can't decide
if "pwd" should be "/bin/pwd" or not. And yes, it behaves when
your at / (at least the first one does). Actually, my real
prompt would print it in reverse video and replace the colon
with a pound sign if I was root. I don't like having to look
hard to find my prompt. :-)
Paul Chamberlain
Computer Product Engineering, Tandy Corp.
ihnp4!sys1!cpe!tif