zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <Peter.Stephenson@csr.com>
To: zsh-workers@zsh.org
Subject: Re: Prefixed backslash removed when completing command
Date: Thu, 20 May 2010 13:39:21 +0100	[thread overview]
Message-ID: <20100520133921.3e91617e@csr.com> (raw)
In-Reply-To: <4BF51CF3.8010609@kth.se>

On Thu, 20 May 2010 13:28:51 +0200
Mikael Auno <auno@kth.se> 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 <pws@csr.com>            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


  reply	other threads:[~2010-05-20 12:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-20 11:28 Mikael Auno
2010-05-20 12:39 ` Peter Stephenson [this message]
2010-10-27  9:06 ` Mikael Auno
2010-10-27 10:02   ` Peter Stephenson
2010-10-27 10:41     ` Mikael Auno
2010-10-27 10:48       ` Peter Stephenson
2010-10-27 12:23         ` Štěpán Němec
2010-10-27 12:29           ` Mikael Magnusson
2010-10-27 12:49           ` PATCH: document more alias problems Peter Stephenson
2010-10-27 10:49       ` Prefixed backslash removed when completing command Mikael Magnusson
2010-10-27 15:43     ` Bart Schaefer

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=20100520133921.3e91617e@csr.com \
    --to=peter.stephenson@csr.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).