From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1d3d704021ddfe52 X-Google-Attributes: gidfee84,public From: Harald Finster Subject: Re: Need to display $PWD in prompt using /bin/ksh Date: 1996/11/28 Message-ID: <329D4BC5.41C6@ave.ac.agit.de>#1/1 X-Deja-AN: 201197504 references: cc: finster content-type: text/plain; charset=us-ascii organization: ave Informations und Verkehrstechnik GmbH mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 3.0 (X11; I; OSF1 V4.0 alpha) Hi, here is a selection of promt-generation methods (without warranty!) # For a prompt like 'alfred:/usr/users/ave> ' use this line: #PS1=`hostname`":"'$PWD'"> " #PS1= "> " # This prompt displays history-index and # the last two components of path: #PS1="("!")""..."'${PWD#${PWD%/*/*}}'"> " # This prompt displays the last two components of path: # It is incorrect if the path has less than 2 components!! # e.g. # if current path is /usr/users/ave/finster/C++lib/xdrstream # .../C++lib/xdrstream> PS1="..."'${PWD#${PWD%/*/*}}'"> " Good luck Harald -- Harald Finster ave GmbH Aachen Seffenter Weg 29 Dennewartstr. 27 52074 Aachen 52068 Aachen priv: +49 241 84075 +49 241 9631530