From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: Re: expansion
Date: Fri, 16 Jun 2000 13:22:10 +0200 (MET DST) [thread overview]
Message-ID: <200006161122.NAA30744@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Thu, 15 Jun 2000 15:32:41 +0000
Bart Schaefer wrote:
> On Jun 15, 5:15pm, Sven Wischnowsky wrote:
> } Subject: Re: PATCH: Re: expansion
> }
> } > a(<tab> and you will get '_expand:78: bad pattern: a(' because of the
> } > lack of a closing bracket.
> }
> } It doesn't anymore, (e) is silent nowadays. By using eval we could get
> } that, though (that's why I said `careful').
>
> Something like this:
>
> eval exp\=\( ${${(q)exp}:gs/\\{/{/:gs/\\}/}/} \)
>
> I haven't figured out where the right place to put that is, though. I
> tried a couple of different spots in _expand and they both caused brace
> *completion* to stop working, even though the word on the line didn't
> change.
What's going on here? With -f:
% a='a{b,c}d'
% b=( ${${(q)a}:gs/\\{/{/:gs/\\}/}/} )
% echo $b
a{b,c}d # OK
% setopt braceccl
% b=( ${${(q)a}:gs/\\{/{/:gs/\\}/}/} )
% echo $b
a,d abd acd
Oops. (Yes, works with just `echo ${${(q)a}...}', too.)
Aha! It's the `{' and `}' in the replacements strings. They get
tokenized by the lexer, etc. etc.
Urgh. How... What... Where...
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2000-06-16 11:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-16 11:22 Sven Wischnowsky [this message]
2000-06-16 12:20 ` Peter Stephenson
-- strict thread matches above, loose matches on Subject: below --
2000-06-16 7:30 Sven Wischnowsky
2000-06-15 15:15 Sven Wischnowsky
2000-06-15 15:32 ` Bart Schaefer
2000-06-15 9:40 Sven Wischnowsky
2000-06-15 9:09 Sven Wischnowsky
2000-06-15 8:26 Sven Wischnowsky
2000-06-15 9:13 ` Bart Schaefer
2000-06-15 9:22 ` Peter Stephenson
2000-06-15 14:54 ` Oliver Kiddle
2000-06-14 16:07 Oliver Kiddle
2000-06-14 18:34 ` Peter Stephenson
2000-06-08 8:37 Sven Wischnowsky
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=200006161122.NAA30744@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).