Subject: Re: command-line editing and "standard" shells....
To: Phil Nelson <phil@cs.wwu.edu>
From: Soren S. Jorvang <soren@t.dk>
List: current-users
Date: 03/20/1999 03:34:55
On Fri, Mar 19, 1999 at 06:27:00PM -0800, Phil Nelson wrote:
> 
> >The man page also says something about inserting magic characters
> >to get the line length right or something. Better look for yourself.
> 
> I did look.  And with some experimentation, I discovered that
> the `pwd` works only at the time one does the PS1= and to get 

The trick is to embed it one notch further as with the single-quotes
in my example below.

> the bash prompt goodies, one would have to redefine cd  and
> do a bunch of tricks ... so I guess I'm still stuck with bash
> to get that functionality.  Also,
> 
> >host=`hostname -s`
> >PS1='->`pwd`
> >$host[!]: '
> 
> the \n in that string is ignored by ksh and it appears on one
> line.  (at least it did for me.)

Using the above as-is (entering it on separate lines) in my NetBSD
-current (pd)ksh gave me exactly the output you sketched in your
previous mail. What output do you get?


-- 
Soren