zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Expanding quotes
Date: Tue, 17 Dec 2013 10:26:48 -0800	[thread overview]
Message-ID: <131217102648.ZM8656@torch.brasslantern.com> (raw)
In-Reply-To: <l8po7s$1og$1@ger.gmane.org>

On Dec 17,  3:48pm, Yuri D'Elia wrote:
} Subject: Expanding quotes
}
} touch file file\' file\"
} ls *\"<TAB>
} 
} 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 *[\']<TAB>
} 
} 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.


  reply	other threads:[~2013-12-17 18:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 14:48 Yuri D'Elia
2013-12-17 18:26 ` Bart Schaefer [this message]
2013-12-23 17:38   ` Yuri D'Elia
2013-12-23 19:15     ` Bart Schaefer
2013-12-24 15:12       ` Ray Andrews
2013-12-24 16:24         ` Yuri D'Elia
2013-12-24 17:18           ` Ray Andrews
2013-12-26 14:50             ` Yuri D'Elia
2013-12-26 19:54               ` Ray Andrews
2013-12-24 16:11       ` Yuri D'Elia
2013-12-25  6:59         ` 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=131217102648.ZM8656@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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).