Why Sponsor Oils? | source | all docs for version 0.19.0 | all versions | oilshell.org
Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.
This chapter in the Oils Reference describes the word language for OSH and YSH.
$'\n'
Also see oil-string.
Evaluates to the stdout of a command. If a trailing newline is returned, it's stripped:
$ hostname
example.com
$ x=$(hostname)
$ echo $x
example.com
Evaluates to the value of a variable:
$ x=X
$ echo $x ${x}
X X
Shell has C-style arithmetic:
$ echo $(( 1 + 2*3 ))
7
Used as a shortcut for a user's home directory:
~/src # my home dir
~bob/src # user bob's home dir
${a[i+1]}
${x@P} evaluates x as a prompt string, e.g. the string that would be printed if PS1=$x.