From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27758 invoked by alias); 19 Oct 2011 10:44:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16521 Received: (qmail 20095 invoked from network); 19 Oct 2011 10:44:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.213.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:x-mailer:mime-version:content-type; bh=0Kozfpdo9pJX8YJQgZhiOi/BQhUsF9Yb2MF1DcQUV6w=; b=IXzcM9qYbNG+Z1FqAnGJ9CMEdOwjmnZL5cpPeFEgtgku9I9yz/V2qPkq04vTLAfu5V fLRPUYBCOANQFCFN+J7JFrKOulX54wRAhIVYVQ+3UYN24UsHLObt0g76E5436cp6Iibf ATkZ3HiFZWnGJcAdzRk4kdwiYMZ8lcUL7EK5o= Date: Wed, 19 Oct 2011 03:44:02 -0700 From: "Suraj N. Kurapati" To: zsh-users@zsh.org Subject: Misc/vcs_info-examples - "git-st" snippet broken? Message-ID: <20111019034402.4d73538a@gmail.com> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/+NHuH5hlHtZr+yOwnKbiQ48"; protocol="application/pgp-signature" --Sig_/+NHuH5hlHtZr+yOwnKbiQ48 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hello, I'm using zsh 4.3.12 (x86_64-unknown-linux-gnu) and have added the "git-st" snippet shown below to my .zshrc file from the ZSH git repository's Misc/vcs_info-examples file. The problem is that +vi-git-st() isn't being called automatically by vcs_info(). What am I doing wrong? Thanks for your consideration. #################################################################### # my "sunaku" prompt from oh-my-zsh (see http://ompldr.org/vOHcwZg) local prompt_user_color=3D'green' test $UID -eq 0 && prompt_user_color=3D'red' PROMPT=3D'%(?..%B%F{red}exit %?%f%b )'\ '$(vcs_info && echo $vcs_info_msg_0_)'\ '%F{$prompt_user_color}%~%b'\ '%(!.#.>) ' RPROMPT=3D'%F{cyan}%@%f' # VCS integration for ZSH command prompt autoload -Uz vcs_info zstyle ':vcs_info:*' stagedstr '%F{green}+%f' zstyle ':vcs_info:*' unstagedstr '%F{yellow}!%f' zstyle ':vcs_info:*' check-for-changes true local prompt_vcs_branch=3D'%m%B%c%u%%b%b' zstyle ':vcs_info:*' formats "$prompt_vcs_branch " zstyle ':vcs_info:*' actionformats "$prompt_vcs_branch %B%F{red}%s:%a%f%%b " ### git: Show +N/-N when your local branch is ahead-of or behind remote HEAD. # Make sure you have added misc to your 'formats': %m zstyle ':vcs_info:git*+set-message:*' hooks git-st function +vi-git-st() { local ahead behind local -a gitstatus # for git prior to 1.7 # ahead=3D$(git rev-list origin/${hook_com[branch]}..HEAD | wc -l) ahead=3D$(git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l) (( $ahead )) && gitstatus+=3D( "+${ahead}" ) # for git prior to 1.7 # behind=3D$(git rev-list HEAD..origin/${hook_com[branch]} | wc -l) behind=3D$(git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l) (( $behind )) && gitstatus+=3D( "-${behind}" ) hook_com[misc]+=3D${(j:/:)gitstatus} } --=20 Cobol programmers are down in the dumps. --Sig_/+NHuH5hlHtZr+yOwnKbiQ48 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk6eqfIACgkQmV9O7RYnKMc+CgCfe/WsX+0R8SkghSfaU2J0PDrI +bQAnjCLfg7w+KL+OR2vcnr6V/JEKKll =TyR8 -----END PGP SIGNATURE----- --Sig_/+NHuH5hlHtZr+yOwnKbiQ48--