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 special variables for OSH and YSH.
ARGVReplacement for "$@"
_DIALECTName of a dialect being evaluated.
_this_dirThe directory the current script resides in. This knows about 3 situations:
oshrc in an interactive shellosh myscript.shsource builtinIt's useful for "relative imports".
The version of Oil that is being run, e.g. 0.9.0.
_statusSet by the try builtin.
try ls /bad
if (_status !== 0) {
echo 'failed'
}
_pipeline_statusAlias for PIPESTATUS.
_process_sub_statusThe exit status of all the process subs in the last command.
For the 'set' builtin.
For the 'shopt' builtin.
$HOME is used for:
Note: The shell doesn't set $HOME. According to POSIX, the program that invokes the login shell sets it based on /etc/passwd.
A colon-separated string that's used to find executables to run.
Used for word splitting. And the builtin split() function.
An array of words, split by : and = for compatibility with bash. New completion scripts should use COMP_ARGV instead.
Discouraged; for compatibility with bash.
Discouraged; for compatibility with bash.
Discouraged; for compatibility with bash.
User-defined completion functions should Fill this array with candidates. It is cleared on every completion request.
An array of partial command arguments to complete. Preferred over COMP_WORDS. The compadjust builtin uses this variable.
(An OSH extension to bash.)