Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: vcs_info: quoting (backticks) in git_patches_applied
- X-seq: zsh-workers 33389
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: Daniel Hahler <dhahler@xxxxxxxxx>
- Subject: Re: vcs_info: quoting (backticks) in git_patches_applied
- Date: Wed, 08 Oct 2014 23:09:01 +0200
- Cc: Zsh Hackers' List <zsh-workers@xxxxxxx>
- In-reply-to: <54355781.7080004@thequod.de> (Daniel Hahler's message of "Wed, 08 Oct 2014 17:25:53 +0200")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <54355781.7080004@thequod.de>
Hello Daniel,
Daniel Hahler wrote:
> I've noticed that there is a problem when using `%m` in vcs_info,
> where the default `get-applied-string` hook returns something with
I'm a bit confused. There is no default gen-applied-string hook.
> backticks in it:
>
>> 6410ed117e51a4288d06132d18e2ffdf33f51313 Add snippets `'`, `"` and `doc`
And there is no such commit in zsh's git repository.
> While the backticks can be replaced in the prompt itself, it might be
> better to quote it in `VCS_INFO_git_handle_patches`:
[...]
> - git_applied_s=${git_patches_applied[1]}
> + git_applied_s=${(qqq)git_patches_applied[1]}
[...]
> There is probably a better place to apply the quoting, e.g. when reading
> the patches from the file, or a more central place in vcs_info, because
> this is likely to affect other backends, too.
I don't think we should post-process these values. The hooks should
return properly quoted data (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.
Correct me if I'm missing something.
Regards, Frank
Messages sorted by:
Reverse Date,
Date,
Thread,
Author