From owner-freebsd-questions Thu May 7 17:55:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA12482 for freebsd-questions-outgoing; Thu, 7 May 1998 17:55:07 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from kstreet.interlog.com (kws@kstreet.interlog.com [198.53.146.171]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA12389 for ; Thu, 7 May 1998 17:54:35 -0700 (PDT) (envelope-from kws@kstreet.interlog.com) Received: (from kws@localhost) by kstreet.interlog.com (8.8.8/8.8.8) id UAA29470; Thu, 7 May 1998 20:52:26 -0400 (EDT) (envelope-from kws) To: Matt Behrens Cc: questions@FreeBSD.ORG Subject: Re: parsable promptstring in sh? References: From: Kevin Street Date: 07 May 1998 20:52:26 -0400 In-Reply-To: Matt Behrens's message of "Thu, 7 May 1998 14:22:50 -0400 (EDT)" Message-ID: <874sz1vb1x.fsf@kstreet.interlog.com> Lines: 26 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matt Behrens 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