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: hiersekorn@addon.de (Edgar Hiersekorn) Subject: Re: Need to display $PWD in prompt using /bin/ksh Date: 1996/11/28 Message-ID: <329d6922.12109112@ehuxs0>#1/1 X-Deja-AN: 201261101 references: content-type: text/plain; charset=us-ascii organization: AddOn Systemhaus GmbH mime-version: 1.0 reply-to: hiersekorn@addon.de newsgroups: comp.unix.osf.osf1 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? Don't use an alias, just define PS1 in .profile: PS1="`hostname`:\$PWD#" Watch the backslash befor $PWD! -- /| Edgar Hiersekorn email: hiersekorn@addon.de / | Leiter Bereich UNIX Phone: +49 (7031) 717722 / ( ) A d d O n Fax: +49 (7031) 717710 /___| Systemhaus GmbH Mobil: +49 (172) 7305922 http://www.addon.de/ <-------------------------