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: rshwake@atww.org (Raymond N Shwake) Subject: Re: Need to display $PWD in prompt using /bin/ksh Date: 1996/11/28 Message-ID: #1/1 X-Deja-AN: 201248915 references: organization: RSX Technical Services newsgroups: comp.unix.osf.osf1 clos@ivory.trentu.ca writes: >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' Add something like the following to your .profile: PS1='!: $PWD> ' This will generate both a command number and the current directory.