From owner-freebsd-questions Fri Sep 26 02:14:19 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA23477 for questions-outgoing; Fri, 26 Sep 1997 02:14:19 -0700 (PDT) Received: from jupiter.leirianet.pt ([195.23.69.129]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id CAA23464 for ; Fri, 26 Sep 1997 02:14:11 -0700 (PDT) Received: from vortex.pluriproj.pt (vortex.pluriproj.pt [195.23.69.137]) by jupiter.leirianet.pt (8.7.6/8.7.3) with SMTP id KAA17969 for ; Fri, 26 Sep 1997 10:12:46 +0100 From: jm@pluriproj.pt (Jose Monteiro) To: freebsd-questions@FreeBSD.ORG Subject: Setting PS1 Date: Fri, 26 Sep 1997 09:11:57 GMT Organization: Pluriproj Lda. Reply-To: Jose Monteiro Message-ID: <342c7acd.3384017@mail.leirianet.pt> X-Mailer: Forte Agent 1.5/32.451 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id CAA23467 Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi, Originally my .bash_profile came with: # # set prompt: ``username@hostname$ '' PS1="`whoami`@`hostname | sed 's/\..*//'`" case `id -u` in 0) PS1="${PS1} # ";; *) PS1="${PS1} $ ";; esac In order to put the current working directory in PS1, I changed the above lines to: # # set prompt: ``username@hostname$ '' PS1="`whoami`@`hostname | sed 's/\..*//'`" case `id -u` in 0) PS1="${PS1} ${PWD}# ";; *) PS1="${PS1} ${PWD}$ ";; esac But the result is a permanent $HOME in PS1, even if I cd to anywhere else. What should I do in order to get a prompt like: jose@thor /usr/local$ cd bin jose@thor /usr/local/bin$ Thanks in advance. Jose Monteiro *--------------Jose Monteiro --------------* | Pluriproj - Redes e Sistemas de Comunicacoes Lda. | | Agente IP em Leiria http://www.pluriproj.pt | *.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·* | Tel: +351 44 8182063 Fax: +351 44 8182061 | | Finger me or search key servers for my PGP public key | *-----------------------------------------------------------*