zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: While on the subject of expansion ...
Date: Thu, 2 Jan 2014 18:40:17 +0000	[thread overview]
Message-ID: <20140102184017.616189cc@pws-pc.ntlworld.com> (raw)
In-Reply-To: <131227100556.ZM25175@torch.brasslantern.com>

On Fri, 27 Dec 2013 10:05:56 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> Unlike the _expand completer which tries globbing separately from other
> expansions, doexpansion() attempts to set up for everything to expand
> at once [via a call to prefork()].  This makes the completion-oriented
> [de-]quoting applied by get_comp_string() problematic.  I wonder which
> kinds of parameter expansions would break if we skipped that part.

I suppose it might be worth a bit of trial simplification after 5.0.5 to see
what happens, though present experience suggests we'll only find out
what the damage is if the result appears in 5.0.6.

(If you think that's hairy, don't look at set_comp_sep() in compcore.c,
which attempts, rather badly, to take account of recursive quoting
i.e. quoted expressions that contain shell code for contexts like "su -c
'...".  I spent some time attacking this a few years ago but retreated
in disarray after my forces were battered to a pulp.  I think it's still
not that hard to get the shell to crash with a bit of playing around.)

> Tangentially related, and mentioning it just so it's on the record in
> case I forget about it later:  The "compfiles" builtin is confused by
> files whose names contain backslashes.  This is another pathological
> case that may not be worth expending much effort.

This one *might* be simple:  a missing removal of quotations or one too
many at a single point in the code.  I haven't looked.

pws


      parent reply	other threads:[~2014-01-02 18:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-27 18:05 Bart Schaefer
2013-12-28  8:23 ` Bart Schaefer
2014-01-02 18:40 ` Peter Stephenson [this message]

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=20140102184017.616189cc@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.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).