From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26486 invoked by alias); 23 Dec 2013 19:15:15 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18247 Received: (qmail 27800 invoked from network); 23 Dec 2013 19:15:09 -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 autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131223111515.ZM31989@torch.brasslantern.com> Date: Mon, 23 Dec 2013 11:15:15 -0800 In-reply-to: Comments: In reply to "Yuri D'Elia" "Re: Expanding quotes" (Dec 23, 6:38pm) References: <131217102648.ZM8656@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Expanding quotes MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 23, 6:38pm, Yuri D'Elia wrote: } } On 12/17/2013 07:26 PM, Bart Schaefer wrote: } > There's a basic conflict in the completion system in that it can't "know" } > if you mean for the literal string backslash-quote to be completed, or if } > you mean for the backslash to have its usual semantic effect on the quote. } } Hhhm, how could this happen? Surely, zsh seem to take note if the } argument to be completed starts with a quote. It's a syntactic question as well as a semantic one. For example, you typed ls *\" and expected completion to treat backslash-dquote as a unit matching a literal double quote. But someone else might type ls *" and expect completion to *supply* the missing backslash, because there is a file name ending with a quote. It gets even more complicated if the backslash is inside another set of quotes, etc. We spent quite a lot of time (years ago) responding to complaints about this kind of thing before finally concluding that we couldn't please everybody and should stick with making the common cases work. A third complication is that there are a huge number of different ways to apply quoting, and trying to figure out which one corresponds to what the user already typed is difficult to generalize. The globbing code that generates the list of possible files returns a particular quoting scheme that would have to be converted to the user's arbitrary quoting. Consequently there are a number of cases that either never came up when this was all being developed, or that have been deemed to seldom come up in practice, where the results are imperfect. We'd be happy to find some more volunteers to work on the internals of completion to resolve more of these cases.