Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 May 2000 06:40:43 -0600
From:      "Duke Normandin" <dnormandin@freewwweb.com>
To:        "Greg Lehey" <grog@lemis.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: sh prompt
Message-ID:  <003f01bfc8aa$4439d6e0$61dba7d1@odie>

next in thread | raw e-mail | index | archive | help
On Saturday, May 27, 2000 10:49 PM Greg Lehey <grog@lemis.com> wrote:


>On Saturday, 27 May 2000 at 22:30:43 -0600, Duke Normandin wrote:
>> I have the following prompt in ~/.shrc:
>>
>> PS1="[$(tty | cut -c9-11)]:`whoami`.`hostname | sed 's/\..*//'`@"`pwd`
>> case `id -u` in
>>         0) PS1="${PS1}# ";;
>>         *) PS1="${PS1}$ ";;
>> esac
>>
>> I want to introduce a ^J or \n in the "case" so that my prompt
>> looks like:
>>
>> blah blah
>> $
>>
>> Anybody know how to get this to happen? Tia....
>
>Just put the \n character in the prompt.  
>
>PS1="${PS1}#
> ";;
>
>You'll presumably use your favourite editor.


sheesh.......... I tried what I thought was every permutation &
combination, except doing what *I think* you're suggesting, i.e.
actually typing in the CRLF. Thanks!!

-duke



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003f01bfc8aa$4439d6e0$61dba7d1>