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: Roland Kruse Subject: Re: Need to display $PWD in prompt using /bin/ksh Date: 1996/11/28 Message-ID: <329D86F5.426@powel.no>#1/1 X-Deja-AN: 201231138 references: <57j43v$l87@portal.gmu.edu> cc: rk content-type: text/plain; charset=us-ascii organization: Powel Data AS mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 3.0 (WinNT; I) Mathew E Goldstein wrote: > > clos@ivory.trentu.ca wrote: > > : 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' You don't need an alias at all, just do this: PS1="\$PWD# " The important thing is the \ before $PWD, it forces the shell to re-evaluate $PWD each time the prompt is printed. BTW, I don't like the "#" in your prompt, it looks too much like a root prompt. Personally, I use PS1="`hostname`:`whoami` \$PWD> " BTW2, you should put all alias and prompt settings in a .kshrc file, and just ENV=$HOME/.kshrc; export ENV in .profile. Roland Kruse