Why Sponsor Oils? | source | all docs for version 0.24.0 | all versions | oilshell.org
Oils Reference — OSH Table of Contents | YSH | Data Notation
OSH is a POSIX- and bash-compatible shell.
[OSH] BashArray BashAssoc
[I/O] read echo printf
readarray mapfile
[Run Code] source . eval trap
[Set Options] set shopt
[Working Dir] cd pwd pushd popd dirs
[Completion] complete compgen compopt compadjust compexport
[Shell Process] exec X logout
umask ulimit times
[Child Process] jobs wait
fg X bg X kill X disown
[External] test [ getopts
[Conditional] cmd/true cmd/false colon :
[Introspection] help hash cmd/type X caller
[Word Lookup] command builtin
[Interactive] alias unalias history X fc X bind
X [Unsupported] enable
[two] log die
[no-quotes] nq-assert nq-run
nq-capture nq-capture-2
nq-redir nq-redir-2
[bash-strict]
[task-five]
[Usage] oils-usage osh-usage config
startup line-editing exit-codes
[Lexing] comment # line-continuation \ ascii-whitespace [ \t\r\n]
[Commands] simple-command prefix-binding
semicolon ;
[Conditional] case if dbracket [[
bang ! and && or ||
[Iteration] while until for for-expr-sh ((
[Control Flow] break continue return exit
[Grouping] sh-func sh-block { subshell (
[Concurrency] pipe | X pipe-amp |& ampersand &
[Redirects] redir-file > >> >| < <> not impl: &>
redir-desc >& <&
here-doc << <<-
here-str <<<
[Other Command] dparen (( time X coproc X select
[Literals] sh-array array=(a b c) array[1]=B "${a[@]}"
sh-assoc assoc=(['a']=1 ['b']=2) assoc['x']=b
[Operators] sh-assign str='xyz'
sh-append str+='abc'
[Builtins] local readonly export unset shift
declare typeset X let
[Quotes] osh-string 'abc' $'line\n' "$var"
[Substitutions] command-sub $(command) `command`
var-sub ${var} $0 $9
arith-sub $((1 + 2))
tilde-sub ~/src
proc-sub diff <(sort L.txt) <(sort R.txt)
[Var Ops] op-test ${x:-default}
op-strip ${x%%suffix} etc.
op-patsub ${x//y/z}
op-index ${a[i+1}
op-slice ${a[@]:0:1}
op-format ${x@P}
[Arithmetic] arith-context Where legacy arithmetic is allowed
sh-numbers 0xFF 0755 etc.
sh-arith 1 + 2*3 a *= 2
sh-logical !a && b
sh-bitwise ~a ^ b
[Boolean] bool-expr [[ ! $x && $y || $z ]]
test ! $x -a $y -o $z
bool-infix $a -nt $b $x == $y
bool-path -d /etc
bool-str -n foo -z ''
bool-other -o errexit -v name[index]
[Patterns] glob-pat *.py
extglob ,(*.py|*.sh)
regex [[ foo =~ [a-z]+ ]]
[Other Sublang] braces {alice,bob}@example.com
histsub !$ !! !n
char-escapes \t \c \x00 \u03bc
[Errors] nounset -u errexit -e inherit_errexit pipefail
[Globbing] noglob -f nullglob failglob X dotglob
dashglob (true)
[Other Option] noclobber -C errtrace -E
[Debugging] xtrace X verbose X extdebug
[Interactive] emacs vi
[Compat] eval_unsafe_arith ignore_flags_not_impl
ignore_shopt_not_impl
[Oils VM] OILS_VERSION LIB_OSH
[POSIX Special] $@ $* $# $? $- $$ $! $0 $9
[Shell Vars] IFS X LANG X GLOBIGNORE
[Shell Options] SHELLOPTS X BASHOPTS
[Other Env] HOME PATH
[Other Special] BASH_REMATCH @PIPESTATUS
[Platform] HOSTNAME OSTYPE
[Call Stack] @BASH_SOURCE @FUNCNAME @BASH_LINENO
X @BASH_ARGV X @BASH_ARGC
[Tracing] LINENO
[Process State] UID EUID PPID X BASHPID
X [Process Stack] BASH_SUBSHELL SHLVL
X [Shell State] BASH_CMDS @DIRSTACK
[Completion] @COMP_WORDS COMP_CWORD COMP_LINE COMP_POINT
COMP_WORDBREAKS @COMPREPLY X COMP_KEY
X COMP_TYPE COMP_ARGV
[History] HISTFILE
[cd] PWD OLDPWD X CDPATH
[getopts] OPTIND OPTARG X OPTERR
[read] REPLY
[Functions] X RANDOM SECONDS
[Signals] SIGTERM SIGINT SIGQUIT
SIGTTIN SIGTTOU SIGWINCH
[Traps] DEBUG ERR EXIT X RETURN
[Words] PS1 X PS2 X PS3 PS4
[Completion] complete
[Other Plugin] PROMPT_COMMAND X command_not_found