Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!dupuy From: dupuy@columbia.UUCP (Alex Dupuy) Newsgroups: comp.unix.questions Subject: Re: prompt wars Message-ID: <4469@columbia.UUCP> Date: Mon, 16-Mar-87 17:47:00 EST Article-I.D.: columbia.4469 Posted: Mon Mar 16 17:47:00 1987 Date-Received: Tue, 17-Mar-87 04:14:51 EST References: <1480@umd5> Reply-To: dupuy@columbia.edu.UUCP (Alex Dupuy) Organization: Columbia University CS Department Lines: 15 Here's a little sed alias which trims the directories in a "dirs" listing to the last two names (if there are more): alias trim "sed -e 's=~*/[^ ]*/\([^ /]*/[^ /]*\)=...\1=g'" so you could say: set prompt = `hostname`[\!]`dirs | trim` note that it leaves all the directory elements in - you may want to strip out all but the first (current). I leave that as an exercise for the reader... I use it to set up a label for my sun shelltool windows. @alex