zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: vcs_info: '%' in payloads not escaped
Date: Fri, 6 Jan 2017 09:27:11 -0800	[thread overview]
Message-ID: <170106092711.ZM7535@torch.brasslantern.com> (raw)
In-Reply-To: <20170106164012.GB4948@fujitsu.shahaf.local2>

On Jan 6,  4:40pm, Daniel Shahaf wrote:
}
} However, I do think this problem is solvable.  The string we produce in
} $vcs_info_msg_N_ should have a defined escaping.  I would suggest to
} define that that string is prompt-escaped - which would be consistent
} with existing code

Yes, having a well-defined reversible escaping of the string would be
the best way to go.  (Reversible in that e.g. ${(Q)...} removes it,
or ${(%)...} does.)

I'm not very familiar with VCS_info.  Frank seemed concerned that the
same variable might contain substrings both from git output that
had one set of quoting needs and also from other sources that had
another set of quoting needs.

If this is indeed the case then there may not be a single reversible
quoting that can be applied to the value as a whole.  To fix this we
would need to provide more variations of the string, e.g., one that
is not escaped and one that is prompt-escaped.


  reply	other threads:[~2017-01-06 17:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-27 15:05 Daniel Shahaf
2016-12-27 15:13 ` Daniel Shahaf
2017-01-05 16:07 ` Daniel Shahaf
2017-01-05 16:27   ` Frank Terbeck
2017-01-06  2:21     ` Daniel Shahaf
2017-01-06 10:41       ` Frank Terbeck
2017-01-06 16:40         ` Daniel Shahaf
2017-01-06 17:27           ` Bart Schaefer [this message]
2017-01-23 11:04             ` Daniel Shahaf
2017-01-23 18:54               ` Frank Terbeck
2017-02-05  8:28                 ` [PATCH] vcs_info: Escape '%' signs in payloads Daniel Shahaf
2017-02-07  8:57                   ` Daniel Shahaf
2017-01-06 15:55   ` vcs_info: '%' in payloads not escaped Bart Schaefer
2017-01-06 16:49     ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=170106092711.ZM7535@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).