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

Re: PATCH: Assorted parameter stuff



On Apr 18, 10:44am, Sven Wischnowsky wrote:
} Subject: Re: PATCH: Assorted parameter stuff
}
} Bart Schaefer wrote:
} 
} > One additional question:  I think it'd be straightforward to make this
} > be parsed as all one word:
} > 
} > % echo $foo[(i)dom str]
} > 
} > I.e. the space inside the [ ] could implicitly be quoted.
} 
} Oh, that would be wonderful.  I remember me fighting with that several
} times (it can get pretty ugly with nested expansions and arrays).

Well, it's not as straightforward as I thought -- the parse gets tangled
up the with parsing of [[ ... ]], among other things -- and I just noticed
that you can get the equivalent effect by surrounding the whole thing with
braces:

% foo='any random string'
% echo ${foo[(i)dom str]}
8

So I think I'm going to leave it at 14008+14016 unless somebody comes up
with other bugs to zap.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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