zsh-users
 help / color / mirror / code / Atom feed
From: Joke de Buhr <joke@seiken.de>
To: zsh-users@zsh.org
Subject: Re: Completion and double quotes
Date: Thu, 12 Aug 2010 00:29:34 +0200	[thread overview]
Message-ID: <201008120029.36482.joke@seiken.de> (raw)
In-Reply-To: <alpine.LNX.2.01.1008111741040.19568@hp>

[-- Attachment #1: Type: Text/Plain, Size: 2092 bytes --]

On Wednesday 11 August 2010 23:51:24 Benjamin R. Haskell wrote:
> On Wed, 11 Aug 2010, Joke de Buhr wrote:
> > Hi,
> > 
> > Currently my completion is somehow configured to transform double
> > quoted paths to backslash escaped paths.
> > 
> > Example:
> >   ls /path/to/"file with"<TAB> -> /path/to/file\ with\ spaces
> > 
> > I would like the completion not to touch the quotation. But I can't
> > figure out how to get zsh to do this. The completion should work like
> > this.
> > 
> > Example:
> >   ls /path/to/"file with"<TAB> -> /path/to/"file with spaces"
> > 
> > I don't remember what completion options caused the current behavior
> > but I remember having zsh configured to not touch the quotes.
> 
> Are you sure your above example worked before?  It's always bugged me a
> little (but not enough to search for it) that zsh leaves:
> 
> "/path/to/file with<Tab>
> as a quoted string:
> "/path/to/file with spaces"
> 
> but:
> /path/to/"file with<Tab>
> becomes toothpicked[1]:
> /path/to/file\ with\ spaces

It's been a while since I reconfigured the completion so maybe I got confused. 
Maybe only a fully quoted path stayed quoted before.

But it would be really useful if the completion would stay quoted because the 
completion doesn't work if the fully quoted path starts with "~/" path. At 
least with my current configuration zsh doesn't offer any possible completion 
in this cases.

Example:
  "~/any/existing/path<TAB>  <-- no completion offered

> So, I'd also be interested to know what I'm overlooking.
> 
> A similar thing that bothers me is the way named directories are
> somewhat inconsistently expanded.  (From my perspective, that is.  It's
> probably entirely internally consistent.)  I can't come up with a
> minimal example right now, but I notice it most when trying to do things
> like:
> 
> for l in ~/bin/{*.pl,<Tab>
> 
> (That is: combinations of bracket expansion and file completion.)
> 
> Perhaps the cure(s) are the same or similar?  (Wouldn't be surprised if
> the latter weren't curable.)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 706 bytes --]

  reply	other threads:[~2010-08-11 22:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 19:30 Joke de Buhr
2010-08-11 21:51 ` Benjamin R. Haskell
2010-08-11 22:29   ` Joke de Buhr [this message]
2010-08-12  9:31 ` Peter Stephenson
2010-08-12 10:53   ` Joke de Buhr
2010-08-12 11:03     ` Peter Stephenson
2010-08-12 15:57   ` 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=201008120029.36482.joke@seiken.de \
    --to=joke@seiken.de \
    --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).