zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: erroneous completion when using {}
Date: Wed, 28 Jun 2000 11:22:20 +0200 (MET DST)	[thread overview]
Message-ID: <200006280922.LAA32227@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Jan Fedak's message of Tue, 27 Jun 2000 17:55:58 +0200


Jan Fedak wrote:

> When I use {} in a glob pattern like this:
> 
> $ cat some/path/{directory\ 1, directory\ 2,_
>                                            ^
> 					   cursor :)
> 
> and hit tab, my precious backslashes get lost:
> 
> $ cat some/path/{directory 1,directory 2,directory\ 

Oh, this is ugly. The problem is this: the completion code gets the
line tokenized, where the backslashes are turned int Bnull tokens. It
has to remove them for normal completion. After that comes the code
that looks for brace expansions, so that can't put the backslashes
back because it can't find where they were. Doing the brace expansion
stuff before removing the Null tokens won't work either because the
brace expansion code has to remove the `{foo,' things from the string.

And just quoting the strings the brace expansion code removes won't
work either because of `{{a,b},' (the braces of `{a,b}' would be
quoted). So we either need a special quoting function or a good idea.

I've got to think about this some more.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-06-28  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-28  9:22 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-06-27 15:55 Jan Fedak
2000-06-27 16:11 ` Andrej Borsenkow

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=200006280922.LAA32227@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).