From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10770 invoked by alias); 17 Sep 2012 14:04:21 -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: 17271 Received: (qmail 3435 invoked from network); 17 Sep 2012 14:04:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.160.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Hc+dca/q8gEZWxfonAi/139fdgU1Vux5Yi5ZlfCmZN4=; b=cHjHO0Yk0yq2QBjf/5Np6g+QnDtrP8nxZw+38At+xH7y3a1WllEl3UIECkHpngLznK 4At1yOyQkToEkK5UaS93c2k0Yr+SG1aUCSEwdXGRr1dFqnsHgmM2hSAKH/UrwMLAhLC1 bQlhn122kp+KDdDaAkj+BGxF3sr6L/GBHgG4y3cbqAvc8oBGKFd4zIznfCEsnIWGWfJY dZ3XJIXJxJRe37mRx0O7wFQv6M+t6LkxKhyjWHgeQ853CgWMmGe4rz2SfWuZ3TsGz2IE l5iytzDijbQ8CAAWGgn08Sh5PC9mlXPm68cpl/1x/Hs0JoLuB4ARVa7b+OQ1UX022Roa /oWw== MIME-Version: 1.0 Date: Mon, 17 Sep 2012 15:37:34 +0200 Message-ID: Subject: vcs_info on a hg repository with a git subrepository; actionformats works ok, formats does not From: Ioannis Koutras To: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear all, I am using zsh v5.0.0, mercurial v2.3.1 and git v1.7.12 on ArchLinux. I have enabled and been using the vcs_info function for my prompt as follow= ing: > autoload -Uz colors && colors > autoload -Uz vcs_info > zstyle ':vcs_info:*' enable git hg svn > zstyle ':vcs_info:*' check-for-changes true > zstyle ':vcs_info:*' get-revision true > zstyle ':vcs_info:*' unstagedstr '!' > zstyle ':vcs_info:hg*:*' branchformat "%b" > zstyle ':vcs_info:hg*:*' hgrevformat "%r" > zstyle ':vcs_info:hg*:*' get-unapplied true > zstyle ':vcs_info:hg*:*' patch-format "mq(%g):%n/%c %p" > zstyle ':vcs_info:hg*:*' nopatch-format "mq(%g):%n/%c %p" > zstyle ':vcs_info:hg*' formats "(%s) [%i%u %b %m]" > zstyle ':vcs_info:hg*' actionformats "(%s|%a) [%i%u %b %m]" > > local user_host=3D"%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}" > local current_dir=3D"%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}" > setopt PROMPT_SUBST > precmd() { vcs_info } > PROMPT=3D'=E2=95=AD=E2=94=80${user_host} ${current_dir} %{$fg[green]%}${v= cs_info_msg_0_}%{$reset_color%} > =E2=95=B0=E2=94=80%B$%b ' Generally this setup works well, there is just one case where it does not, a mercurial repository with a git sub-repository. More specifically, when no change has been done I get a prompt like this: > (hg) [git --version ] On the other hand, prompt is ok if there is a change, e.g.: > (hg) [5! default ] I have found out that %i is replaced by "git" and %b by "--version" in formats, but in actionformats they seem to be properly replaced. Apparently this is an issue of the formatting, but in previous versions it was working. E.g. the same configuration works on another PC with zsh v4.3.17, mercurial v2.0.2 and git v1.7.9.5. Any idea what could be the problem? Kind regards, Yannis