From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26073 invoked by alias); 4 Feb 2016 22:12:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37884 Received: (qmail 1750 invoked from network); 4 Feb 2016 22:12:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 From: Frank Terbeck To: Valni Cc: zsh-workers@zsh.org Subject: Re: Call git directly to bypass possible functions under the same name In-Reply-To: <56B3BBEE.3030309@gmail.com> (Valni's message of "Thu, 4 Feb 2016 22:00:30 +0100") References: <56B3BBEE.3030309@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Date: Thu, 04 Feb 2016 22:19:05 +0100 Message-ID: <878u30jhrq.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: NDMwNDQ0 Valni wrote: > Hopefully I have reached the right mailing list and posted a valid > question/issue. This would probably be better suited on the zsh-users list, but you're in the right vicinity. :) > --- > > I stumbled upon an issue today when creating a function which adds SSH > keys to an agent on demand. This function should (and does, in `zsh -f`) > only be called when git/ssh is used. The function also has the same name > as the program. > > However, I use a zsh framework which depends on vcs_info, which causes > some issue (https://github.com/Eriner/zim/issues/30). > > When git is called from vcs_info, it does not appear to call it > directly, so any definitions of it, such as a function, will take priority. > > This results in the function (seen in the first post of the GitHub > issue) being called when any (or none at all) command is called, because > the framework checks if the current directory is used by git using vcs_info. > > Could vcs_info be changed so that it calls git directly? Thus far, this > appears to be the cause of the issue. We are not going to change the way that vcs_info works with respect to this. If you got a wrapper that is incompatible with the way that git works, use a "command" style to force the command used by vcs_info to its full path name: % zstyle ':vcs_info:git:*:-all-' command =git Regards, Frank