From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6114 invoked by alias); 17 Dec 2013 18:26:56 -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: 18243 Received: (qmail 29018 invoked from network); 17 Dec 2013 18:26:50 -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: <131217102648.ZM8656@torch.brasslantern.com> Date: Tue, 17 Dec 2013 10:26:48 -0800 In-reply-to: Comments: In reply to "Yuri D'Elia" "Expanding quotes" (Dec 17, 3:48pm) References: 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 17, 3:48pm, Yuri D'Elia wrote: } Subject: Expanding quotes } } touch file file\' file\" } ls *\" } } results in: } } % ls file file\" file\' Hmm, somewhere down in the completion internals the code that sets the PREFIX string is re-quoting both the backslash and the single quote. When this is re-interpolated by the expand-word code it turns into the empty string, so you get the expansion of "*". } % ls *[\'] } } doesn't expand Same problem, except you get the expansion of *[] which is an invalid pattern and hence nothing. 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.