current pwd in prompt
G. Roderick Singleton
gerry at syntron.UUCP
Sat Feb 13 10:59:36 AEST 1988
In article <11724 at brl-adm.ARPA> kevinc%bearcat.lim.tek.com at relay.cs.net (Kevin Cosgrove 627-5212) writes:
<Dave,
<
<> Can anyone explain to me how to get my prompt to be the current directory? I
<> have tried several methods without any success. It seems that no matter what
<> method I try, the prompt is evaluated once and never changes.
<>
<> Just in case it matters, I am on an AT&T 3B2/400 running korn shell under UNIX
<> System V.3.1.
<>
<> Thanks,
<> Dave Mensing
<>
<> mensing.henr801c at xerox.com
<> (716) 427-6423
<
< I use the following alias with C shell. I put the following line
< in my ~/.cshrc file.
<
< alias cd 'chdir \!*;set prompt="[`whoami`@`hostname`-$cwd:t] "'
<_____________________________________________________________________________
<
< Kevin Cosgrove Tektronix, Inc.
< 11K Plug-Ins Project Leader PO Box 500, M/S 47-092
< LIM Product Test Engineering Beaverton, OR 97077
< kevinc at bearcat.LIM.TEK.COM (503)-627-5212
<_____________________________________________________________________________
For those with source lisences, there is yet another solution. Install
the Georgia Tech modifications on /bin/sh and your requirement is met within
sh, itself. Even better news you get tilde name and history without the
overhead of /bin/csh. These were posted some time ago but are still available
from most of the archive sites. Makes using Bourne shell worthwhile.
--
G. Roderick Singleton | "ALL animals are created equal,
<gerry at syntron.uucp>, | BUT some animals are MORE equal
or <gerry at geac.uucp>, | than others." a warning from
or <gerry at eclectic.uucp> | "Animal Farm" by George Orwell
More information about the Comp.unix.wizards
mailing list