Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.

Oil Word Language Extensions

Table of Contents
Inline function Calls
That Return Strings
That Return Arrays
Unimplemented

Inline function Calls

That Return Strings

echo $stringfunc(x, y)

NOTE: "__$stringfunc(x, y)__" doesn't work. Do this instead:

var s = stringfunc(x, y)
echo "__$s__"

That Return Arrays

cc -o foo -- @arrayfunc(x, y)
@array

Conclusion: I think the conservative approach is better.

This is the same discussion as $f(x) vs$(f(x))` on the inline function calls thread.

We only want to interpolate vars and functions. Arbitrary expressions aren't necessary.

In summary:

OK I'm pretty happy with this explanation! Shell is messy but Oil is bringing some order to it :)


And then for completeness we also have:

Unimplemented

${x|html}

${x %.3f}


Generated on Thu Dec 5 20:35:25 PST 2019