From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4949 invoked by alias); 9 Oct 2014 15:20:15 -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: 33401 Received: (qmail 28913 invoked from network); 9 Oct 2014 15:20:13 -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.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 From: Frank Terbeck To: Daniel Hahler Cc: Zsh Hackers' List Subject: Re: vcs_info: quoting (backticks) in git_patches_applied In-Reply-To: <5435B523.5010804@thequod.de> (Daniel Hahler's message of "Thu, 09 Oct 2014 00:05:23 +0200") References: <54355781.7080004@thequod.de> <87a956i80i.fsf@ft.bewatermyfriend.org> <5435B523.5010804@thequod.de> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.93 (gnu/linux) Date: Thu, 09 Oct 2014 17:04:13 +0200 Message-ID: <87eguh474i.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: NDMwNDQ0 Daniel Hahler wrote: > On 08.10.2014 23:09, Frank Terbeck wrote: [...] > The quoting needs to get applied to all places where the Git sources > are being read in Functions/VCS_Info/Backends/VCS_INFO_get_data_git > then probably, and also in the code for other VCS (e.g. hg). > >> (I suppose your problem is that your hook >> does returns a - maybe even single - backtick and you use the >> prompt_subst option which would cause problems) as the rest of the >> configuration requires. > > That's correct. I guess we could introduce a function that does some form of post-processing , if a style is set. Valid settings could be "quote" or "strip" and "function", the latter would dispatch to a named function, for example for the user to get full control. That function could be used everywhere where a string from an external program is used. That way, prompt_subst users (if you don't use prompt_subst, which is the default, none of this is an issue) can get post-processing if they like. Actually, we could make the default depend on the state of the option when vcs_info initialises. Unfortunately, I can't look into it right now due to lack of spare time. Regards, Frank