From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16714 invoked by alias); 2 Jan 2014 18:40:28 -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: 32214 Received: (qmail 6845 invoked from network); 2 Jan 2014 18:40:22 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=lWf5SLuY0v0zUtQ/g75H5Tmm98HJTpInzl5/I5FgQRY=; b=W1nL7QZjiOclgRX6djWRPPd9VPTSNVQsrMCVP/YItq9Z/iRSkv7FfJFBcEZKBYJCKh bXuS27Zsfy671xJVyR9F3UDBJF1aVZvGqfNxEwsmETv4QgVAxpwXpt7M0+RP1V9spkGX 1Xea8o8WSwpvXzlafT62jEU0kod8lxFuc3RIz2bRs6ELpsGWRsxlHkgXca7D/uyInwMz pX7RAe+V5KxX3AIISKgnfrcJwkMDWW3m6/HdEayFldUfuDUNqb8PLdkgnv51lPQE5xvR /QrVkabdTzGbSqF2zPlHOEnxlp+sZREwAvu3LDdOiQEzeK9VaKUEm5cpL9Lsl97Eu6YM nvxA== X-Gm-Message-State: ALoCoQk/T2xXivpZLLwhEpMAw5RET6k4GfVUH7aF/bm2s2XdfMqBHnmRdmLsQeN8HA4nsTmW3K69 X-Received: by 10.180.74.230 with SMTP id x6mr55232254wiv.29.1388688020071; Thu, 02 Jan 2014 10:40:20 -0800 (PST) X-ProxyUser-IP: 86.6.157.246 Date: Thu, 2 Jan 2014 18:40:17 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: While on the subject of expansion ... Message-ID: <20140102184017.616189cc@pws-pc.ntlworld.com> In-Reply-To: <131227100556.ZM25175@torch.brasslantern.com> References: <131227100556.ZM25175@torch.brasslantern.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 27 Dec 2013 10:05:56 -0800 Bart Schaefer 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