Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Harald Finster <finster@ave.ac.agit.de>
Cc: finster
Subject: Re: Need to display $PWD in prompt using /bin/ksh
Date: 1996/11/28	[thread overview]
Message-ID: <329D4BC5.41C6@ave.ac.agit.de> (raw)
In-Reply-To: E1Jx6w.9t1@blaze.trentu.ca


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



  parent reply	other threads:[~1996-11-28  5:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-27  5:00 Need to display $PWD in prompt using /bin/ksh clos
1996-11-28  5:00 ` Edgar Hiersekorn
1996-11-28  5:00 ` Michael Livingston
1996-11-28  5:00 ` Raymond N Shwake
1996-11-29  5:00   ` John Meyers, Computing Services
1996-11-28  5:00 ` Mathew E Goldstein
1996-11-28  5:00   ` Roland Kruse
1996-11-28  5:00 ` Harald Finster [this message]
1996-12-02  5:00 ` Ian Mortimer
1996-12-07  5:00   ` system PRIVILEGED account
1996-12-09  5:00     ` Ian Mortimer
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