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: Michael Livingston Subject: Re: Need to display $PWD in prompt using /bin/ksh Date: 1996/11/28 Message-ID: #1/1 X-Deja-AN: 201254168 references: x-sender: mlivings@mail content-type: TEXT/PLAIN; charset=US-ASCII organization: ABSnet Internet Services, Inc. - (410)-685-2000 - info@abs.net mime-version: 1.0 reply-to: Michael Livingston newsgroups: comp.unix.osf.osf1 On Wed, 27 Nov 1996 clos@ivory.trentu.ca wrote: > > > We are using Korn shell (/bin/ksh) and I would like to have the shell display my > present working directory ($PWD) in my command prompt evertime I "cd" to a > different directory. I have tried the following aliases in my .profile but with > out success: > > alias p='PS1=`hostname|cut -d. -f1`":$PWD#"' > alias cd='cd \!* ; p' > > > Any ideas on what I am doing wrong? > > I hate having the command prompt taking up a significant part of the line as it can when the current working directory is in it. When I'm in a windowing environment I alias cd to a function that puts $PWD in the terminal window's title bar. For xterm this is: echo "\033]2;${PWD}\007\c"