Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: globsubst and =command



Peter Stephenson wrote:

> Sven wrote:
> > Tanaka Akira wrote:
> > > serein% print -r - $~a
> > > =ls
> > > 
> > > Since the expansion of =command is kind of filename expansion and ~
> > > enables filename expansion on the result, I think $~a should be expand
> > > to /bin/ls.  Do I miss something?
> > 
> > I don't think it should do that because it really is something
> > completely different.
> 
> $~a does do ~dir expansion (that's where the ~ originally came from, before
> it ever tokenized the rest of the pattern), which is performed at the same
> time as =cmd expansion, so it is a little odd.  The real issue is that `='
> don't get tokenized by on-the-fly tokenization.  This patch would do that.
> But if you can think of a good reason for not...?

Actually, I don't care that much, I was only thinking of cases where
something like this is used in test (`[[ \=foo = $~bar ]]') and didn't 
think of the `~' handling. And now that I have actually looked at the
docs: they are described together so...


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author