[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interactive $PWD in prompt using /bin/sh ?



Matthew Law wrote:
> Hi,
> 
> I'm using the bourne shell as default for my user account on OpenBSD 3.5 
> and I'd like the prompt to track the current $PWD.  Is there an easy way 
> of doing this other than making an alias for 'cd' to a script that 
> changes the directory and then resets the prompt after a directory 
> change?  I'm coming from a Linux background (no flames please!) and I 
> would like the equivalent to my bash prompt which uses '\u' to get the 
> current working dir.  I know I can install bash but I'd rather stick 
> with the shells that come with a default OpenBSD install otherwise I 
> won't learn anything, will I?

Well, you got the right attitude. :)

> Thanks in advance and my apologies if this has already been answered 
> recently,

http://www.openbsd.org/faq/faq10.html#ksh
It even happens to be The Example.  btw: ksh.kshrc is way cool.

And test 3.6 snapsho...er...oh, ok, that's COMPLETELY off topic here. :)

Nick.
-- 
http://www.holland-consulting.net



Visit your host, monkey.org