Date: Thu, 21 Feb 2002 18:10:02 -0600 From: "Mike Meyer" <mwm-dated-1014768602.7032ce@mired.org> To: DragonRyder <dragonr@xmission.com> Cc: questions@freebsd.org Subject: Re: Prompt Help Message-ID: <15477.35930.416615.717086@guru.mired.org> In-Reply-To: <14561397@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
DragonRyder <dragonr@xmission.com> types: > My question is this... > I don't like using pwd to determine where I am everytime I go to use a > command. Is there a way of changing the prompt so I don't have to use > the pwd all the time? As others have pointed out, it depends on your shell. If you're using /bin/sh, then I'm not sure it can be done. Others have given the answer for tcsh, which what /bin/csh actually is. That covers the shells that come bundled with FreeBSD. I use zsh, where it would be PS1='%~%#'. However, zsh has a very cool variable called RPROMPT. It's expanded just like the prompt, then displayed right justified on the command line. So I set RPROMPT=' %~', and the working directory is on the right-hand side of the line I'm typing on. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15477.35930.416615.717086>