Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!brl-adm!adm!parrish@nadc.arpa From: parrish@nadc.arpa (D. Parrish) Newsgroups: comp.unix.questions Subject: Re: `pwd` in Shell prompt Message-ID: <12752@brl-adm.ARPA> Date: 1 Apr 88 13:00:11 GMT Sender: news@brl-adm.ARPA Lines: 52 Mark, You're gonna get a lot of abuse. This question has been asked on this mailing list three or four times already. But anyhow, Dave asked it last and he sent me the information he got, so now I'll forward it to you. Hope this helps. Denice parrish@nadc.arpa From Dave_B._Mensing.HENR801c@Xerox.COM Thu Feb 11 14:03:04 1988 Below you will find a summary of the 40+ responses I received. KSH: To set your PS1 variable to show the current path: PS1='$PWD ' You can also try which removes the HOME directory from the prompt when I am in a subdirectory of my HOME directory. PS1='${PWD#$HOME/}: ' CSH: To set your prompt variable to show the current path: set prompt="`pwd`" alias setprompt 'set prompt="`pwd`"' alias cd 'cd \!* ; setprompt' alias pd 'pushd \!* ; setprompt' alias popd 'popd \!* ; setprompt' You need to ensure that after any command which can change your directory, you reset the prompt. If you need more info please message me and I will try to help. I forgot to mention the following: KSH: Insert the PS1=... stuff into your '.profile' file. CSH: Insert the prompt=... stuff into your '.cshrc' file. Sorry about that! Dave Mensing mensing.henr801c@xerox.com (716) 427-6423