Quoth Anthony Martin <[email protected]>:
> Yaroslav <[email protected]> once said:
> > 2. The use of ifs. You're correct in your suspicion that it may not be
> > a straightforward replacement, and it wasn't. In fact, being aware of
> > its intricacies, the largest body of work on this port I spent on was
> > evaluating the effect of each such replacement on a case by case
> > basis. I believe the ifs overrides I ended up putting forward all work
> > as intended.
>
> The special splitting version of the backquote construct
>
> w = ` $split {cmds}
>
> is equivalent to
>
> oifs=$ifs ifs=$split {
> w = `{ifs=$oifs oifs=() cmds}
> }
>
> but much more convenient.
>
> It was added to 9atom in 2011, 9front in 2016, and plan9port
> in 2025. At this point, 9legacy should just incorporate it.
>
> It also gets close to my preferred syntax for no word splitting
> at all: "{} from Inferno's sh becomes `''{}.
>
Almost -- I think you need to keep a stack of old IFSs because
you can nest `$sp{}
oifs=($ifs $oifs)
...
oifs=$oifs(2-)
------------------------------------------
9fans: 9fans
Permalink:
https://9fans.topicbox.com/groups/9fans/Td167d7e8cebadcc4-Mb78140dcbc653612852b9129
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription