From owner-freebsd-questions Thu Feb 21 16:10:10 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mired.org (dsl-64-192-6-133.telocity.com [64.192.6.133]) by hub.freebsd.org (Postfix) with SMTP id 8453037B416 for ; Thu, 21 Feb 2002 16:10:03 -0800 (PST) Received: (qmail 72848 invoked by uid 100); 22 Feb 2002 00:10:02 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15477.35930.416615.717086@guru.mired.org> Date: Thu, 21 Feb 2002 18:10:02 -0600 To: DragonRyder Cc: questions@freebsd.org Subject: Re: Prompt Help In-Reply-To: <14561397@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: "Mike Meyer" X-Delivery-Agent: TMDA/0.46 (Python 2.2; freebsd-4.5-STABLE-i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG DragonRyder 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. 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