Date: Tue, 26 Feb 2002 13:45:35 +0100 From: Roman Neuhauser <neuhauser@mobil.cz> To: questions@freebsd.org Subject: Re: Prompt Help Message-ID: <20020226124535.GX311@roman.mobil.cz> In-Reply-To: <15477.35930.416615.717086@guru.mired.org> References: <14561397@toto.iv> <15477.35930.416615.717086@guru.mired.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Thu, 21 Feb 2002 18:10:02 -0600 > To: DragonRyder <dragonr@xmission.com> > Cc: questions@freebsd.org > Subject: Re: Prompt Help > From: "Mike Meyer" <mwm-dated-1014768602.7032ce@mired.org> > > 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? > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020226124535.GX311>