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

Re: Is this a side effect of RC_EXPAND_PARAM?



    Hi Bart :)

 * Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> dixit:
> With rcexpandparam the empty element is retained so that it can be
> joined with whatever appears on both sides of the expansion (even
> though in this case that's nothing) so you get the equivalent of
> 
>     vara=("one" "two" "" "four" "five")

    So it's not a side effect nor a bug, it's a feature...
 
> whereas with it NOT set, the empty element is removed, so you get
> 
>     vara=(one two  four five)

    This is what I always get, BTW, if I hit <Tab> to expand the
variable assignment, no matter the status of rcexpandparam. This was
confusing me even more.
 
> Forcing empty elements to be retained as empty rather than removed
> is one reason the compsys functions have rcexpandparam set. 
> Admittedly this ought to be documented, rather than assuming that
> anyone who sets rcexpandparam must be familiar with the semantics
> of the rc shell ...

    My problem was that I wasn't associating rcexpandparam with the
rc shell in any way O:) All is clear now, thanks a lot :)))

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...



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