From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,f34855607b0d024c X-Google-Attributes: gidfee84,public From: Harald Finster Subject: Re: How can I display $PWD on xterm prompt? Date: 1997/08/05 Message-ID: <33E6E08F.794B@ave.ac.agit.de>#1/1 X-Deja-AN: 262684370 References: <33E643C8.41C6@cranfield.ac.uk> To: Yon Han Chong Organization: ave Informations und Verkehrstechnik GmbH Newsgroups: comp.unix.osf.osf1 Yon Han Chong wrote: > > How can I display $PWD on xterm prompt? > Hi, if you are working with 'ksh' try something like the following: PS1='${PWD}' to get a prompt like: /usr/users/ave/finster or PS1=`hostname -s`":"'${PWD#${PWD%/*/*}}'"> " ; to get a prompt consisting of hostname and the last two elements of the current path, e.g.: alfred:/ave/finster> All the best Harald -- Dr. Ing. Harald Finster ave Verkehrs- und Informationstechnik GmbH