From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21899 invoked by alias); 22 Sep 2012 00:17:08 -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: 17284 Received: (qmail 20476 invoked from network); 22 Sep 2012 00:16:57 -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 autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.82.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=2oGdzqm+C4okqpVo9mDiZgFIBcHPOJa1XLvMQLaTXwY=; b=lHPUUol8cDuqSLNLaog06IpS7/EH/FIPwHSrZB6XLePQcCn/foMhPfE4MwoltZw5Qd xR2RwP0jWzpcizWAo0iWltQF2DYiY22lou8EQPlEgM+s1nkpGTlzkvDRA6FoTTzbErUE ubMDr3KHjDGj5mDVOlM81WmblNJp59xtG+ueM7jKs4E6h7BvNolH0YkFOuX3ngu/7fpA qQUJmVVBqZioW+57IYtDt57lPiH6MdlOm7GLMXpoCTdvZk7nDfDgTGmy1HFCu7O8r4Kw r/9XW54+WOv0+Ukwa1O6uFcPWGnn4RSnznkU7PHxo4Jf2P4P//hz+II12OyP6t2P3f50 Orsw== MIME-Version: 1.0 In-Reply-To: References: From: Baptiste Daroussin Date: Sat, 22 Sep 2012 01:49:18 +0200 Message-ID: Subject: Re: vcs_info : git, hg, svn, fossil, etc. To: Gautier DI FOLCO Cc: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2012/9/20 Gautier DI FOLCO : > Hi all, > > I'm new to zsh and to this ML, so I have few questions. > To begin I'm running zsh 4.3.17 (i386-redhat-linux-gnu) on a fedora 17-i6= 86, > I use oh-my-zsh, but I'm a bit limited by the lack of support from other = VCS > that git, I also use svn, hg, fossil, so I search and I find vcs_info! I > fall in love > of zsh again. So I edit my them to have the following thing : > #!/usr/bin/env zsh > > # Set required options. > setopt promptsubst > > # Load required modules. > autoload -U add-zsh-hook > autoload -Uz vcs_info > > # Add hook for calling vcs_info before each command. > add-zsh-hook precmd vcs_info > > # Set vcs_info parameters. > zstyle ':vcs_info:*' enable hg bzr git svn fossil > zstyle ':vcs_info:*:*' check-for-changes true # Can be slow on big repos. > zstyle ':vcs_info:*:*' unstagedstr '!' > zstyle ':vcs_info:*:*' stagedstr '%B%{$fg[green]%} =E2=9C=9A%{$reset_colo= r%}' > zstyle ':vcs_info:*:*' actionformats "%S" "%r/%s/%b %u%c (%a)" > zstyle ':vcs_info:*:*' formats "%c" "[|%i] > %B%{$fg[blue]%}%s:%{$fg[red]%}%b%{$reset_color%}" > zstyle ':vcs_info:*:*' nvcsformats "" "" > zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b' > > PROMPT=3D'%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[red]%}=E2=9E= =9C > %{$reset_color%}' > > ZSH_THEME_GIT_PROMPT_PREFIX=3D"git:%{$fg[red]%}" > ZSH_THEME_GIT_PROMPT_SUFFIX=3D"%{$reset_color%}" > ZSH_THEME_GIT_PROMPT_DIRTY=3D"%{$fg[red]%}%{$reset_color%}" > ZSH_THEME_GIT_PROMPT_CLEAN=3D"" > > RPROMPT=3D'${vcs_info_msg_0_} > ${vcs_info_msg_1_}${return_status}$(git_prompt_status) > $(git_time_since_commit)%{$reset_color%}' > > It doesn't work : > > - Git is well supported (because it is part of omz) > - Branches aren't supported for svn (only the root directory is printe= d) > - Hg last commit doesn't appear > - Fossil is not supported at all For fossil the thing is that VCS_INFO_detect_fossil is only looking for _FOSSIL_ file but now on unix by default it should be looking for .fslckout To make this work, edit the file, change: vcs_comm[detect_need_file]=3D_FOSSIL_ to vcs_comm[detect_need_file]=3D"_FOSSIL_ .fslckout" And it will work. Tested and approved here :) regards, Bapt