From owner-freebsd-questions Tue Feb 26 4:33:17 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mobil.cz (diana.mobil.cz [194.228.200.160]) by hub.freebsd.org (Postfix) with ESMTP id D6BBD37B402 for ; Tue, 26 Feb 2002 04:33:11 -0800 (PST) Received: from ester.mobil.cz (ester.mobil.cz [194.213.62.23]) by mobil.cz (8.11.6/8.11.0) with ESMTP id g1QCX6105652 for ; Tue, 26 Feb 2002 13:33:06 +0100 Received: from roman.mobil.cz ([10.2.0.89]) by ester.mobil.cz (Lotus Domino Release 5.0.7) with ESMTP id 2002022613292373:8834 ; Tue, 26 Feb 2002 13:29:23 +0100 Received: (from roman@localhost) by roman.mobil.cz (8.11.6/8.11.6) id g1QCjak24992 for questions@freebsd.org; Tue, 26 Feb 2002 13:45:36 +0100 (CET) (envelope-from neuhauser@mobil.cz) X-Authentication-Warning: roman.mobil.cz: roman set sender to neuhauser@mobil.cz using -f Date: Tue, 26 Feb 2002 13:45:35 +0100 From: Roman Neuhauser To: questions@freebsd.org Subject: Re: Prompt Help Message-ID: <20020226124535.GX311@roman.mobil.cz> Mail-Followup-To: questions@freebsd.org References: <14561397@toto.iv> <15477.35930.416615.717086@guru.mired.org> Mime-Version: 1.0 In-Reply-To: <15477.35930.416615.717086@guru.mired.org> User-Agent: Mutt/1.3.26i X-MIMETrack: Itemize by SMTP Server on ester/Mobil(Release 5.0.7 |March 21, 2001) at 02/26/2002 01:29:23 PM, Serialize by Router on ester/Mobil(Release 5.0.7 |March 21, 2001) at 02/26/2002 01:29:31 PM, Serialize complete at 02/26/2002 01:29:31 PM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > Date: Thu, 21 Feb 2002 18:10:02 -0600 > To: DragonRyder > Cc: questions@freebsd.org > Subject: Re: Prompt Help > From: "Mike Meyer" > > 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? > > 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. zsh coolnes doesn't stop there, however. this is what I use: autoload -U colors; colors PROMPT="%{$fg_no_bold[green]%}%n@%m %3~ %(!.#.>)%{$reset_color%} " RPROMPT="%{$fg_no_bold[green]%}%!:%?%{$reset_color%}" example result (actually, both sides of the prompt are green. I use the same .zshrc with just different prompt colors on various machines): roman@roman ~ > cd /usr/src/sys/i386/conf 122:0 roman@roman sys/i386/conf > su -m 123:0 Password: root@roman sys/i386/conf # 101:0 -- FreeBSD 4.4-STABLE 1:38PM up 4 days, 20:03, 14 users, load averages: 0.00, 0.03, 0.06 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message