Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] vcs_info: Use ‘command’ prefix to call version control programs



Thanks all for answering.

On Wed, 22 Oct 2014 14:03:13 +0200
Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:

> Hey Daniel,
> 
> Daniel Shahaf wrote:
> > Frank Terbeck wrote on Wed, Oct 22, 2014 at 11:28:24 +0200:
> [...]
> >>     I think this is reasonable. I hope, people don't count on
> >>     wrapper functions to work to achieve some sort of sinister
> >>     hack. :)
> >> 
> >
> > I hate to say this after you already wrote the patch, but:
> 
> No worries. Changing those lines took like five minutes. :)
> 
> > There are legitimate use-cases for wrapper functions, and your patch
> > would break them.  (For example, someone might use a wrapper
> > function to dispatch to a different svn binary depending on the
> > working copy they are in.)
> 
> I was afraid someone might say that. :)
> 

I agree there are use-cases for a wrapper function. :-)

Although in my case I could fix it easily in my function svn() because
I always issue a debug message to stdout (in this case stderr would
be better I have to admit) which makes normal parsing of the svn command
fail if function svn gets called instead of command svn. After removing
it all is fine now.

Nevertheless, I think a wrapper function isn't illegal and shouldn't
fail. 


-- 
Manfred





Messages sorted by: Reverse Date, Date, Thread, Author