Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Harald Finster <finster@ave.ac.agit.de>
To: Yon Han Chong <Y.H.Chong@cranfield.ac.uk>
Subject: Re: How can I display $PWD on xterm prompt?
Date: 1997/08/05	[thread overview]
Message-ID: <33E6E08F.794B@ave.ac.agit.de> (raw)
In-Reply-To: 33E643C8.41C6@cranfield.ac.uk


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



      parent reply	other threads:[~1997-08-05  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-04  4:00 How can I display $PWD on xterm prompt? Yon Han Chong
1997-08-05  4:00 ` Torsten Hehl
1997-08-05  4:00 ` Harald Finster [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox