Date: 07 May 1998 20:52:26 -0400 From: Kevin Street <street@iname.com> To: Matt Behrens <matt@zigg.com> Cc: questions@FreeBSD.ORG Subject: Re: parsable promptstring in sh? Message-ID: <874sz1vb1x.fsf@kstreet.interlog.com> In-Reply-To: Matt Behrens's message of "Thu, 7 May 1998 14:22:50 -0400 (EDT)" References: <Pine.BSF.3.96.980507142109.25649A-100000@megaweapon.zigg.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Matt Behrens <matt@zigg.com> writes:
> Can I somehow do this:
>
> set -o promptexpn
> PS1=\`pwd\`$; export PS1
>
> or some such to have a prompt that is expanded by sh? (I know there is no
> promptexpn option, per se, but there's got to be something, right?)
You could do something like this in your profile:
setprompt () {
PS1=`pwd`' $';
};
cd () {
command cd "$@";
setprompt;
};
setprompt;
--
Kevin Street
street@iName.com
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?874sz1vb1x.fsf>
