From owner-freebsd-questions Fri Sep 26 03:35:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA27739 for questions-outgoing; Fri, 26 Sep 1997 03:35:29 -0700 (PDT) Received: from mailgate.greenhills.co.uk (mailgate.greenhills.co.uk [195.11.194.180]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id DAA27734 for ; Fri, 26 Sep 1997 03:35:23 -0700 (PDT) Received: (qmail 11451 invoked by uid 982); 26 Sep 1997 10:32:57 -0000 Message-ID: <19970926113257.40412@webcrawler.com> Date: Fri, 26 Sep 1997 11:32:57 +0100 From: Martijn Koster To: Jose Monteiro Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Setting PS1 References: <342c7acd.3384017@mail.leirianet.pt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.76 In-Reply-To: <342c7acd.3384017@mail.leirianet.pt>; from Jose Monteiro on Fri, Sep 26, 1997 at 09:11:57AM +0000 Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, Sep 26, 1997 at 09:11:57AM +0000, Jose Monteiro wrote: > What should I do [to .bash_profile] in order to get a prompt like: > > jose@thor /usr/local$ cd bin > jose@thor /usr/local/bin$ `man bash` of course :-) ... Bash allows these prompt strings to be customized by inserting a number of backslash-escaped special characters that are decoded as follows: .... \w the current working directory so do: $ cd /usr/local $ export PS1='\u@\h \w$ ' mak@mindy /usr/local$ cd bin mak@mindy /usr/local/bin$ -- Martijn Koster, m.koster@pobox.com