From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18359 invoked by alias); 20 May 2010 12:39:34 -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: 27961 Received: (qmail 15217 invoked from network); 20 May 2010 12:39:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) 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, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Thu, 20 May 2010 13:39:21 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Prefixed backslash removed when completing command Message-ID: <20100520133921.3e91617e@csr.com> In-Reply-To: <4BF51CF3.8010609@kth.se> References: <4BF51CF3.8010609@kth.se> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.9; i686-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 May 2010 12:39:22.0036 (UTC) FILETIME=[78F03740:01CAF819] X-Scanned-By: MailControl A_09_40_00 (www.mailcontrol.com) on 10.71.0.137 On Thu, 20 May 2010 13:28:51 +0200 Mikael Auno wrote: > Hi. I don't know if prefixing a command with a backslash to suppress > alias expansion is a intentional feature or not. If it is though, tab > completing a (complete or incomplete) command prefixed with a > backslash ought not remove the backslash. Current behavior seems to > be to complete something like "\mpla" to "mplayer" and not to > "\mplayer" as I would expect. > > I would be happy to try to fix it myself if no one has time to do it. > A pointer on where to start looking in that case would be good though > as I'm not at all familiar with the code of Zsh. You're quite right that this should work better, but I suspect fixing it is a real pig. Quoting is one of the messiest parts of completion (regular viewers will know this is rather a strong statement). I think fixing it properly by leaving all quoting in place isn't going to be easy (to put it mildly). I think you have a workaround, though: use an initial single quote. Not only does that get kept, the closing single quote is put in place afterwards. Is this good enough? (It would be good to document this but goodness knows where it goes.) -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom