Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Git info in right prompt
- X-seq: zsh-users 14699
- From: John Magolske <listmail@xxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Git info in right prompt
- Date: Sun, 3 Jan 2010 01:09:47 -0800
- In-reply-to: <87iqbk1448.wl%djcb@xxxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20100102094112.GA7659@xxxxxxxxxxxx> <87iqbk1448.wl%djcb@xxxxxxxxxxxxxxx>
* Dirk-Jan C. Binnema <djcb.bulk@xxxxxxxxx> [100102 15:52]:
> >>>>> "John" == John Magolske <listmail@xxxxxxx> writes:
> John> I'd like to display the current git branch in the right prompt,
> John> ...
> John> ... and I can't seem to make any "display git branch" thing work
>
> Below is my setup for my prompts; it's a bit *more* than what you ask
> for, but it is hopefully helpful.
Thanks, 'tis more than what I need at the moment, but it'll be handy
to refer to over time for sure. Here's what I've settled on for now:
autoload -Uz vcs_info
precmd () {
psvar=()
vcs_info
[[ -n $vcs_info_msg_0_ ]] && psvar[1]="$vcs_info_msg_0_"
}
export PROMPT="%B%F{green} %~%(1v.%b%F{yellow}%1v%f.) %B%F{yellow}%# %b%F{white}"
However, for some reason the git info will appear in my prompt only
if I do something like `mv /etc/zsh/zshrc /etc/zsh/zshrc-1`
Seems something in the zshrc that came with the Grml distro I'm
using is preventing the display of git info (or maybe I'm just doing
something wrong). I tried reading through and commenting out various
sections of that zshrc to figure out what might be causing this
interaction to no avail. Any ideas?
John
--
John Magolske
http://B79.net/contact
Messages sorted by:
Reverse Date,
Date,
Thread,
Author