status | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | |
pass | 15 | 11 | 12 | 13 | 9 | 11 | 7 | 6 | 10 | 16 | |
ok | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | |
N-I | 1 | 5 | 0 | 3 | 6 | 0 | 0 | 0 | 0 | 0 | |
BUG-2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | |
BUG | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | |
FAIL | 0 | 0 | 5 | 0 | 0 | 6 | 10 | 11 | 7 | 0 | |
TIME | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
total | 17 | 17 | 17 | 17 | 17 | 17 | 17 | 17 | 17 | 17 | |
case | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | description |
0 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | sh -c |
1 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | empty -c input |
2 | pass | pass | pass | pass | N-I | FAIL | FAIL | FAIL | FAIL | pass | sh +c is accepted |
details | details | details | details | details | |||||||
3 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | empty stdin |
4 | pass | pass | pass | BUG | BUG-2 | pass | FAIL | FAIL | FAIL | ok | sh - and sh -- stop flag processing |
details | details | details | details | details | details | ||||||
5 | pass | N-I | FAIL | pass | N-I | FAIL | pass | FAIL | pass | pass | shell obeys --help (regression for OSH) |
details | details | details | details | details | |||||||
6 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | args are passed |
7 | pass | pass | pass | pass | pass | pass | pass | FAIL | pass | pass | args that look like flags are passed after script |
details | |||||||||||
8 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | FAIL | pass | args that look like flags are passed after -c |
details | details | details | |||||||||
9 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | exit with explicit arg |
10 | pass | pass | pass | pass | pass | pass | FAIL | pass | pass | pass | exit with no args |
details | |||||||||||
11 | TIME | N-I | FAIL | N-I | N-I | FAIL | FAIL | FAIL | FAIL | pass | --rcfile in non-interactive shell prints warnings |
details | details | details | details | details | details | details | details | details | |||
12 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | pass | pass | accepts -l flag |
details | details | ||||||||||
13 | pass | ok | pass | pass | ok | FAIL | FAIL | FAIL | pass | pass | accepts --login flag (dash and mksh don't accept long flags) |
details | details | details | details | details | |||||||
14 | N-I | N-I | FAIL | N-I | N-I | FAIL | FAIL | FAIL | FAIL | pass | osh --eval |
details | details | details | details | details | details | details | details | details | |||
15 | pass | N-I | FAIL | pass | N-I | pass | FAIL | FAIL | FAIL | pass | Set LC_ALL LC_CTYPE LC_COLLATE LANG - affects glob ? |
details | details | details | details | details | details | ||||||
16 | pass | N-I | FAIL | N-I | N-I | FAIL | FAIL | FAIL | FAIL | pass | LC_ALL=invalid |
details | details | details | details | details | details | details | details |
110 passed, 3 OK, 15 not implemented, 2 BUG, 39 failed, 1 timeouts, 0 cases skipped
mksh | 2 sh +c is accepted stdout: stderr: mksh: echo hi: No such file or directory |
ksh | 2 sh +c is accepted [ksh stdout] Expected 'hi\n' Got '' [ksh status] Expected 0 Got 127 stdout: stderr: E: ksh: echo hi: No such file or directory |
toysh | 2 sh +c is accepted [toysh stdout] Expected 'hi\n' Got '' [toysh status] Expected 0 Got 1 stdout: stderr: sh: +c: No such file or directory |
sush | 2 sh +c is accepted [sush stdout] Expected 'hi\n' Got '' [sush status] Expected 0 Got 2 stdout: stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: echo hi: No such file or directory |
brush | 2 sh +c is accepted [brush stdout] Expected 'hi\n' Got '' [brush status] Expected 0 Got 1 stdout: stderr: [31mERROR[0m error: failed to source file: +c; i/o error: No such file or directory (os error 2) |
zsh | 4 sh - and sh -- stop flag processing stdout: stderr: |
mksh | 4 sh - and sh -- stop flag processing stdout: foo - foostderr: echo foo + echo foo - |
toysh | 4 sh - and sh -- stop flag processing [toysh stdout] Expected 'foo\n-\nfoo\n' Got '' [toysh stderr] Expected 'echo foo\n+ echo foo\n-\necho foo\n+ echo foo\n' Got 'munmap_chunk(): invalid pointer\n' [toysh status] Expected 0 Got -6 stdout: stderr: munmap_chunk(): invalid pointer |
sush | 4 sh - and sh -- stop flag processing [sush stdout] Expected 'foo\n-\nfoo\n' Got '-\n' [sush stderr] Expected 'echo foo\n+ echo foo\n-\necho foo\n+ echo foo\n' Got ': line : set: --: invalid option\n-\n: line : set: -: invalid option\n' [sush status] Expected 0 Got 2 stdout: -stderr: : line : set: --: invalid option - : line : set: -: invalid option |
brush | 4 sh - and sh -- stop flag processing [brush stdout] Expected 'foo\n-\nfoo\n' Got '-\n' [brush stderr] Expected 'echo foo\n+ echo foo\n-\necho foo\n+ echo foo\n' Got '\x1b[31mERROR\x1b[0m error: failed to source file: --; i/o error: No such file or directory (os error 2)\n-\n\x1b[31mERROR\x1b[0m error: failed to source file: -; i/o error: No such file or directory (os error 2)\n' stdout: -stderr: [31mERROR[0m error: failed to source file: --; i/o error: No such file or directory (os error 2) - [31mERROR[0m error: failed to source file: -; i/o error: No such file or directory (os error 2) |
osh | 4 sh - and sh -- stop flag processing stdout: foo - foostderr: + echo foo - + echo foo |
dash | 5 shell obeys --help (regression for OSH) stdout: stderr: dash: 0: Illegal option -- |
ash | 5 shell obeys --help (regression for OSH) [ash stdout] Expected 'yes\n' Got '' stdout: stderr: BusyBox v1.35.0 (2024-01-25 12:41:21 EST) multi-call binary. Usage: ash [-il] [-|+Cabefmnuvx] [-|+o OPT]... [-c 'SCRIPT' [ARG0 ARGS] | FILE ARGS | -s ARGS] Unix shell interpreter |
mksh | 5 shell obeys --help (regression for OSH) stdout: stderr: mksh: mksh: --: unknown option |
ksh | 5 shell obeys --help (regression for OSH) [ksh stdout] Expected 'yes\n' Got '' stdout: stderr: E: ksh: --: unknown option |
sush | 5 shell obeys --help (regression for OSH) [sush stdout] Expected 'yes\n' Got '' stdout: stderr: Sushi shell (a.k.a. Sush), version 1.2.2 - release Usage: sushi [LONG OPTIONS] [OPTIONS] [SCRIPT] [ARGS] Options: -c Execute COMMAND and exit -i Force interactive mode -l, --login unsuported -r unsuported -s unsuported -D unsuported -O, +O unsuported -- unsuported --debugger unsuported --dimp-po-strings unsuported --help Display this help message and exit --init-file FILE unsuported --rcfile FILE unsuported --noediting unsuported --noprofile unsuported --norc unsuported --posix unsuported --restricted unsuported -v, --verbose unsuported --version Display version information and exit -e Exit immediately if a command returns non‑zero --pipefail Return status of first failing command in pipeline -B Enable brace expansion (equivalent to `set -B`) Compound commands: if Conditional execution while Loop while a condition is true () Run commands in a subshell case Match patterns against a word until unsupported for Iterate over a list of items Builtin commands: : No-op (does nothing) "." Source a file in the current shell alias Define or display aliases bg Resume a job in the background bind Unsupported break Exit from a loop builtin Execute a shell builtin, bypassing functions caller Unsupported cd Change the current directory command Execute a command, ignoring shell functions compgen Generate possible completion matches complete Specify how arguments are completed compopt Unsupported continue Resume the next iteration of a loop declare Unsupported dirs Unsupported disown Unsupported echo Unsupported enable Unsupported eval Evaluate arguments as a shell command exec Unsupported exit Exit the shell export Unsupported false Do nothing, unsuccessfully fc Unsupported fg Resume a job in the foreground getopts Parse positional parameters hash Unsupported help Unsupported history Show or manipulate the command history jobs Display status of jobs kill Unsupported let Unsupported local Declare local variables inside functions logout Unsupported mapfile Unsupported popd Unsupported printf Unsupported pushd Unsupported pwd Print the current working directory read Read a line from standard input readonly Unsupported return Return from a shell function set Modify shell options shift Shift positional parameters shopt Change shell optional behavior source Read and execute commands from a file suspend Unsupported test Unsupported times Unsupported trap Unsupported true Do nothing, successfully type Unsupported typeset Unsupported ulimit Unsupported umask Unsupported unalias Remove aliases unset Unset variables or functions wait Wait for jobs to complete Special parameters: "$" Process ID of the shell or script ? Exit status of the last command @ All positional parameters (as separate words) # Number of positional parameters - Current shell options _ Last argument of the previous command ! unsupported Shell options: dotglob Include hidden files (starting with .) in pathname expansions extglob Enable extended pattern matching operators progcomp Enable programmable command completion nullglob Allow patterns which match nothing to expand to null string Born Shell Variables: CDPATH unsuported HOME User’s home directory IFS Internal Field Separator (partial support) MAIL unsuported MAILPATH unsuported OPTARG Argument value for the current option (getopts) OPTIND Index of the next argument to be processed by getopts PATH Search path for commands PS1 Primary prompt string PS2 Secondary prompt string Bash Variables: _ Last argument of the previous command BASH unsuported BASHOPTS unsuported BASHPID PID of the current Bash process BASH_ALIASES unsuported BASH_ARGC unsuported BASH_ARGV unsuported BASH_ARGV0 unsuported BASH_CMDS unsuported BASH_COMMAND unsuported BASH_COMPAT unsuported BASH_ENV unsuported BASH_EXECUTION_STRING unsuported BASH_LINENO unsuported BASH_LOADABLES_PATH unsuported BASH_REMATCH Array of regex capture groups BASH_SOURCE unsuported BASH_SUBSHELL Current subshell level BASH_VERSINFO Array with Bash version fields BASH_VERSION Human‑readable Bash version BASH_XTRACEFD unsuported CHILD_MAX unsuported COLUMNS unsuported COMP_CWORD unsuported COMP_LINE unsuported COMP_POINT unsuported COMP_TYPE unsuported COMP_KEY unsuported COMP_WORDBREAKS unsuported COMP_WORDS unsuported COMPREPLY unsuported COPROC unsuported DIRSTACK unsuported EMACS unsuported ENV unsuported EPOCHREALTIME Epoch seconds with microseconds EPOCHSECONDS Epoch seconds (integer) EUID unsuported EXECIGNORE unsuported FCEDIT unsuported FIGNORE unsuported FUNCNAME unsuported FUNCNEST unsuported GLOBIGNORE unsuported GROUPS unsuported histchars unsuported HISTCMD unsuported HISTCONTROL unsuported HISTFILE Path to the history file HISTFILESIZE Max lines kept in history file HISTIGNORE unsuported HISTSIZE unsuported HISTTIMEFORMAT unsuported HOSTFILE unsuported HOSTNAME unsuported HOSTTYPE Hardware platform string IGNOREEOF unsuported INPUTRC unsuported INSIDE_EMACS unsuported LANG Current locale LC_ALL unsuported LC_COLLATE unsuported LC_CTYPE unsuported LC_MESSAGES unsuported LC_NUMERIC unsuported LC_TIME unsuported LINENO Current script line number LINES unsuported MACHTYPE Machine type triple MAILCHECK unsuported MAPFILE unsuported OLDPWD Previous working directory OPTERR unsuported OSTYPE Operating‑system type PIPESTATUS Exit statuses of the last pipeline POSIXLY_CORRECT unsuported PPID unsuported PROMPT_COMMAND unsuported PROMPT_DIRTRIM unsuported PS0 unsuported PS3 unsuported PS4 Debug prompt (used with set -x) PWD Current working directory RANDOM Pseudo‑random integer (0‑32767) READLINE_ARGUMENT unsuported READLINE_LINE unsuported READLINE_MARK unsuported READLINE_POINT unsuported REPLY unsuported SECONDS Seconds since the shell started SHELL Path to the user’s default shell SHELLOPTS unsuported SHLVL Shell nesting level SRANDOM 64-bit cryptographic random TIMEFORMAT unsuported TMOUT unsuported TMPDIR unsuported UID unsuported Beyond Bash feature: branch display in prompt Project homepage: https://github.com/shellgei/rusty_bash |
sush | 7 args that look like flags are passed after script [sush stdout] Expected "['--help', '--help', '-h']\n" Got '' stdout: stderr: Sushi shell (a.k.a. Sush), version 1.2.2 - release Usage: sushi [LONG OPTIONS] [OPTIONS] [SCRIPT] [ARGS] Options: -c Execute COMMAND and exit -i Force interactive mode -l, --login unsuported -r unsuported -s unsuported -D unsuported -O, +O unsuported -- unsuported --debugger unsuported --dimp-po-strings unsuported --help Display this help message and exit --init-file FILE unsuported --rcfile FILE unsuported --noediting unsuported --noprofile unsuported --norc unsuported --posix unsuported --restricted unsuported -v, --verbose unsuported --version Display version information and exit -e Exit immediately if a command returns non‑zero --pipefail Return status of first failing command in pipeline -B Enable brace expansion (equivalent to `set -B`) Compound commands: if Conditional execution while Loop while a condition is true () Run commands in a subshell case Match patterns against a word until unsupported for Iterate over a list of items Builtin commands: : No-op (does nothing) "." Source a file in the current shell alias Define or display aliases bg Resume a job in the background bind Unsupported break Exit from a loop builtin Execute a shell builtin, bypassing functions caller Unsupported cd Change the current directory command Execute a command, ignoring shell functions compgen Generate possible completion matches complete Specify how arguments are completed compopt Unsupported continue Resume the next iteration of a loop declare Unsupported dirs Unsupported disown Unsupported echo Unsupported enable Unsupported eval Evaluate arguments as a shell command exec Unsupported exit Exit the shell export Unsupported false Do nothing, unsuccessfully fc Unsupported fg Resume a job in the foreground getopts Parse positional parameters hash Unsupported help Unsupported history Show or manipulate the command history jobs Display status of jobs kill Unsupported let Unsupported local Declare local variables inside functions logout Unsupported mapfile Unsupported popd Unsupported printf Unsupported pushd Unsupported pwd Print the current working directory read Read a line from standard input readonly Unsupported return Return from a shell function set Modify shell options shift Shift positional parameters shopt Change shell optional behavior source Read and execute commands from a file suspend Unsupported test Unsupported times Unsupported trap Unsupported true Do nothing, successfully type Unsupported typeset Unsupported ulimit Unsupported umask Unsupported unalias Remove aliases unset Unset variables or functions wait Wait for jobs to complete Special parameters: "$" Process ID of the shell or script ? Exit status of the last command @ All positional parameters (as separate words) # Number of positional parameters - Current shell options _ Last argument of the previous command ! unsupported Shell options: dotglob Include hidden files (starting with .) in pathname expansions extglob Enable extended pattern matching operators progcomp Enable programmable command completion nullglob Allow patterns which match nothing to expand to null string Born Shell Variables: CDPATH unsuported HOME User’s home directory IFS Internal Field Separator (partial support) MAIL unsuported MAILPATH unsuported OPTARG Argument value for the current option (getopts) OPTIND Index of the next argument to be processed by getopts PATH Search path for commands PS1 Primary prompt string PS2 Secondary prompt string Bash Variables: _ Last argument of the previous command BASH unsuported BASHOPTS unsuported BASHPID PID of the current Bash process BASH_ALIASES unsuported BASH_ARGC unsuported BASH_ARGV unsuported BASH_ARGV0 unsuported BASH_CMDS unsuported BASH_COMMAND unsuported BASH_COMPAT unsuported BASH_ENV unsuported BASH_EXECUTION_STRING unsuported BASH_LINENO unsuported BASH_LOADABLES_PATH unsuported BASH_REMATCH Array of regex capture groups BASH_SOURCE unsuported BASH_SUBSHELL Current subshell level BASH_VERSINFO Array with Bash version fields BASH_VERSION Human‑readable Bash version BASH_XTRACEFD unsuported CHILD_MAX unsuported COLUMNS unsuported COMP_CWORD unsuported COMP_LINE unsuported COMP_POINT unsuported COMP_TYPE unsuported COMP_KEY unsuported COMP_WORDBREAKS unsuported COMP_WORDS unsuported COMPREPLY unsuported COPROC unsuported DIRSTACK unsuported EMACS unsuported ENV unsuported EPOCHREALTIME Epoch seconds with microseconds EPOCHSECONDS Epoch seconds (integer) EUID unsuported EXECIGNORE unsuported FCEDIT unsuported FIGNORE unsuported FUNCNAME unsuported FUNCNEST unsuported GLOBIGNORE unsuported GROUPS unsuported histchars unsuported HISTCMD unsuported HISTCONTROL unsuported HISTFILE Path to the history file HISTFILESIZE Max lines kept in history file HISTIGNORE unsuported HISTSIZE unsuported HISTTIMEFORMAT unsuported HOSTFILE unsuported HOSTNAME unsuported HOSTTYPE Hardware platform string IGNOREEOF unsuported INPUTRC unsuported INSIDE_EMACS unsuported LANG Current locale LC_ALL unsuported LC_COLLATE unsuported LC_CTYPE unsuported LC_MESSAGES unsuported LC_NUMERIC unsuported LC_TIME unsuported LINENO Current script line number LINES unsuported MACHTYPE Machine type triple MAILCHECK unsuported MAPFILE unsuported OLDPWD Previous working directory OPTERR unsuported OSTYPE Operating‑system type PIPESTATUS Exit statuses of the last pipeline POSIXLY_CORRECT unsuported PPID unsuported PROMPT_COMMAND unsuported PROMPT_DIRTRIM unsuported PS0 unsuported PS3 unsuported PS4 Debug prompt (used with set -x) PWD Current working directory RANDOM Pseudo‑random integer (0‑32767) READLINE_ARGUMENT unsuported READLINE_LINE unsuported READLINE_MARK unsuported READLINE_POINT unsuported REPLY unsuported SECONDS Seconds since the shell started SHELL Path to the user’s default shell SHELLOPTS unsuported SHLVL Shell nesting level SRANDOM 64-bit cryptographic random TIMEFORMAT unsuported TMOUT unsuported TMPDIR unsuported UID unsuported Beyond Bash feature: branch display in prompt Project homepage: https://github.com/shellgei/rusty_bash |
toysh | 8 args that look like flags are passed after -c [toysh stdout] Expected "['--help', '-h']\n" Got 'Toybox 0.8.12 multicall binary (see toybox --help)\n\nusage: sh [-c command] [script]\n\nCommand shell. Runs a shell script, or reads input interactively\nand responds to it. Roughly compatible with "bash". Run "help" for\nlist of built-in commands.\n\n-c\tcommand line to execute\n-i\tinteractive mode (default when STDIN is a tty)\n-s\tdon\'t run script (args set $* parameters but read commands from stdin)\n\nCommand shells parse each line of input (prompting when interactive), perform\nvariable expansion and redirection, execute commands (spawning child processes\nand background jobs), and perform flow control based on the return code.\n\nParsing:\n syntax errors\n\nInteractive prompts:\n line continuation\n\nVariable expansion:\n Note: can cause syntax errors at runtime\n\nRedirection:\n HERE documents (parsing)\n Pipelines (flow control and job control)\n\nRunning commands:\n process state\n builtins\n cd [[ ]] (( ))\n ! : [ # TODO: help for these?\n true false help echo kill printf pwd test\n child processes\n\nJob control:\n & Background process\n Ctrl-C kill process\n Ctrl-Z suspend process\n bg fg jobs kill\n\nFlow control:\n; End statement (same as newline)\n& Background process (returns true unless syntax error)\n&& If this fails, next command fails without running\n|| If this succeeds, next command succeeds without running\n| Pipelines! (Can of worms...)\nfor {name [in...]}|((;;)) do; BODY; done\nif TEST; then BODY; fi\nwhile TEST; do BODY; done\ncase a in X);; esac\n[[ TEST ]]\n((MATH))\n\nJob control:\n& Background process\nCtrl-C kill process\nCtrl-Z suspend process\nbg fg jobs kill\n' stdout: Toybox 0.8.12 multicall binary (see toybox --help) usage: sh [-c command] [script] Command shell. Runs a shell script, or reads input interactively and responds to it. Roughly compatible with "bash". Run "help" for list of built-in commands. -c command line to execute -i interactive mode (default when STDIN is a tty) -s don't run script (args set $* parameters but read commands from stdin) Command shells parse each line of input (prompting when interactive), perform variable expansion and redirection, execute commands (spawning child processes and background jobs), and perform flow control based on the return code. Parsing: syntax errors Interactive prompts: line continuation Variable expansion: Note: can cause syntax errors at runtime Redirection: HERE documents (parsing) Pipelines (flow control and job control) Running commands: process state builtins cd [[ ]] (( )) ! : [ # TODO: help for these? true false help echo kill printf pwd test child processes Job control: & Background process Ctrl-C kill process Ctrl-Z suspend process bg fg jobs kill Flow control: ; End statement (same as newline) & Background process (returns true unless syntax error) && If this fails, next command fails without running || If this succeeds, next command succeeds without running | Pipelines! (Can of worms...) for {name [in...]}|((;;)) do; BODY; done if TEST; then BODY; fi while TEST; do BODY; done case a in X);; esac [[ TEST ]] ((MATH)) Job control: & Background process Ctrl-C kill process Ctrl-Z suspend process bg fg jobs killstderr: |
sush | 8 args that look like flags are passed after -c [sush stdout] Expected "['--help', '-h']\n" Got '' stdout: stderr: Sushi shell (a.k.a. Sush), version 1.2.2 - release Usage: sushi [LONG OPTIONS] [OPTIONS] [SCRIPT] [ARGS] Options: -c Execute COMMAND and exit -i Force interactive mode -l, --login unsuported -r unsuported -s unsuported -D unsuported -O, +O unsuported -- unsuported --debugger unsuported --dimp-po-strings unsuported --help Display this help message and exit --init-file FILE unsuported --rcfile FILE unsuported --noediting unsuported --noprofile unsuported --norc unsuported --posix unsuported --restricted unsuported -v, --verbose unsuported --version Display version information and exit -e Exit immediately if a command returns non‑zero --pipefail Return status of first failing command in pipeline -B Enable brace expansion (equivalent to `set -B`) Compound commands: if Conditional execution while Loop while a condition is true () Run commands in a subshell case Match patterns against a word until unsupported for Iterate over a list of items Builtin commands: : No-op (does nothing) "." Source a file in the current shell alias Define or display aliases bg Resume a job in the background bind Unsupported break Exit from a loop builtin Execute a shell builtin, bypassing functions caller Unsupported cd Change the current directory command Execute a command, ignoring shell functions compgen Generate possible completion matches complete Specify how arguments are completed compopt Unsupported continue Resume the next iteration of a loop declare Unsupported dirs Unsupported disown Unsupported echo Unsupported enable Unsupported eval Evaluate arguments as a shell command exec Unsupported exit Exit the shell export Unsupported false Do nothing, unsuccessfully fc Unsupported fg Resume a job in the foreground getopts Parse positional parameters hash Unsupported help Unsupported history Show or manipulate the command history jobs Display status of jobs kill Unsupported let Unsupported local Declare local variables inside functions logout Unsupported mapfile Unsupported popd Unsupported printf Unsupported pushd Unsupported pwd Print the current working directory read Read a line from standard input readonly Unsupported return Return from a shell function set Modify shell options shift Shift positional parameters shopt Change shell optional behavior source Read and execute commands from a file suspend Unsupported test Unsupported times Unsupported trap Unsupported true Do nothing, successfully type Unsupported typeset Unsupported ulimit Unsupported umask Unsupported unalias Remove aliases unset Unset variables or functions wait Wait for jobs to complete Special parameters: "$" Process ID of the shell or script ? Exit status of the last command @ All positional parameters (as separate words) # Number of positional parameters - Current shell options _ Last argument of the previous command ! unsupported Shell options: dotglob Include hidden files (starting with .) in pathname expansions extglob Enable extended pattern matching operators progcomp Enable programmable command completion nullglob Allow patterns which match nothing to expand to null string Born Shell Variables: CDPATH unsuported HOME User’s home directory IFS Internal Field Separator (partial support) MAIL unsuported MAILPATH unsuported OPTARG Argument value for the current option (getopts) OPTIND Index of the next argument to be processed by getopts PATH Search path for commands PS1 Primary prompt string PS2 Secondary prompt string Bash Variables: _ Last argument of the previous command BASH unsuported BASHOPTS unsuported BASHPID PID of the current Bash process BASH_ALIASES unsuported BASH_ARGC unsuported BASH_ARGV unsuported BASH_ARGV0 unsuported BASH_CMDS unsuported BASH_COMMAND unsuported BASH_COMPAT unsuported BASH_ENV unsuported BASH_EXECUTION_STRING unsuported BASH_LINENO unsuported BASH_LOADABLES_PATH unsuported BASH_REMATCH Array of regex capture groups BASH_SOURCE unsuported BASH_SUBSHELL Current subshell level BASH_VERSINFO Array with Bash version fields BASH_VERSION Human‑readable Bash version BASH_XTRACEFD unsuported CHILD_MAX unsuported COLUMNS unsuported COMP_CWORD unsuported COMP_LINE unsuported COMP_POINT unsuported COMP_TYPE unsuported COMP_KEY unsuported COMP_WORDBREAKS unsuported COMP_WORDS unsuported COMPREPLY unsuported COPROC unsuported DIRSTACK unsuported EMACS unsuported ENV unsuported EPOCHREALTIME Epoch seconds with microseconds EPOCHSECONDS Epoch seconds (integer) EUID unsuported EXECIGNORE unsuported FCEDIT unsuported FIGNORE unsuported FUNCNAME unsuported FUNCNEST unsuported GLOBIGNORE unsuported GROUPS unsuported histchars unsuported HISTCMD unsuported HISTCONTROL unsuported HISTFILE Path to the history file HISTFILESIZE Max lines kept in history file HISTIGNORE unsuported HISTSIZE unsuported HISTTIMEFORMAT unsuported HOSTFILE unsuported HOSTNAME unsuported HOSTTYPE Hardware platform string IGNOREEOF unsuported INPUTRC unsuported INSIDE_EMACS unsuported LANG Current locale LC_ALL unsuported LC_COLLATE unsuported LC_CTYPE unsuported LC_MESSAGES unsuported LC_NUMERIC unsuported LC_TIME unsuported LINENO Current script line number LINES unsuported MACHTYPE Machine type triple MAILCHECK unsuported MAPFILE unsuported OLDPWD Previous working directory OPTERR unsuported OSTYPE Operating‑system type PIPESTATUS Exit statuses of the last pipeline POSIXLY_CORRECT unsuported PPID unsuported PROMPT_COMMAND unsuported PROMPT_DIRTRIM unsuported PS0 unsuported PS3 unsuported PS4 Debug prompt (used with set -x) PWD Current working directory RANDOM Pseudo‑random integer (0‑32767) READLINE_ARGUMENT unsuported READLINE_LINE unsuported READLINE_MARK unsuported READLINE_POINT unsuported REPLY unsuported SECONDS Seconds since the shell started SHELL Path to the user’s default shell SHELLOPTS unsuported SHLVL Shell nesting level SRANDOM 64-bit cryptographic random TIMEFORMAT unsuported TMOUT unsuported TMPDIR unsuported UID unsuported Beyond Bash feature: branch display in prompt Project homepage: https://github.com/shellgei/rusty_bash |
brush | 8 args that look like flags are passed after -c [brush stdout] Expected "['--help', '-h']\n" Got 'Bo[u]rn[e] RUsty SHell \xf0\x9f\xa6\x80 (https://brush.sh)\n\nUsage: brush [OPTIONS]... [SCRIPT_PATH [SCRIPT_ARGS]...]\n\nArguments:\n [SCRIPT_PATH [SCRIPT_ARGS]...]... Path and arguments for script to execute (optional)\n\nOptions:\n --help Display usage information\n --version Display shell version\n --sh Run in `sh` compatibility mode, as if run as `/bin/sh`\n\nStandard shell options:\n -C Enable `noclobber` shell option\n -c <COMMAND> Execute the provided command and then exit\n -i Run in interactive mode\n -l, --login Make shell act as if it had been invoked as a login shell\n -n Do not execute commands\n --noediting Don\'t use readline for input\n --noprofile Don\'t process any profile/login files (`/etc/profile`, `~/.bash_profile`,\n `~/.bash_login`, `~/.profile`)\n --norc Don\'t process "rc" files if the shell is interactive (e.g., `~/.bashrc`,\n `~/.brushrc`)\n --noenv Don\'t inherit environment variables from the calling process\n -o <OPTION> Enable option (`set -o` option)\n -O <SHOPT_OPTION> Enable `shopt` option\n --posix Disable non-POSIX extensions\n --rcfile <FILE> Path to the rc file to load in interactive shells (instead of `bash.bashrc`\n and `~/.bashrc`)\n -s Read commands from standard input\n -t Run only one command and then exit\n -v, --verbose Print input when it\'s processed\n -x Print commands as they execute\n\nUser interface options:\n --disable-bracketed-paste Disable bracketed paste\n --disable-color Disable colorized output\n --enable-highlighting Enable syntax highlighting (experimental)\n --input-backend <BACKEND> Input backend [possible values: reedline, basic, minimal]\n --debug <EVENT> Enable debug logging for classes of tracing events [possible\n values: arithmetic, commands, complete, expand, functions, input,\n jobs, parse, pattern, tokenize, unimplemented]\n --disable-event <EVENT> Disable logging for classes of tracing events (takes same event\n types as `--debug`)\n' stdout: Bo[u]rn[e] RUsty SHell 🦀 (https://brush.sh) Usage: brush [OPTIONS]... [SCRIPT_PATH [SCRIPT_ARGS]...] Arguments: [SCRIPT_PATH [SCRIPT_ARGS]...]... Path and arguments for script to execute (optional) Options: --help Display usage information --version Display shell version --sh Run in `sh` compatibility mode, as if run as `/bin/sh` Standard shell options: -C Enable `noclobber` shell option -c <COMMAND> Execute the provided command and then exit -i Run in interactive mode -l, --login Make shell act as if it had been invoked as a login shell -n Do not execute commands --noediting Don't use readline for input --noprofile Don't process any profile/login files (`/etc/profile`, `~/.bash_profile`, `~/.bash_login`, `~/.profile`) --norc Don't process "rc" files if the shell is interactive (e.g., `~/.bashrc`, `~/.brushrc`) --noenv Don't inherit environment variables from the calling process -o <OPTION> Enable option (`set -o` option) -O <SHOPT_OPTION> Enable `shopt` option --posix Disable non-POSIX extensions --rcfile <FILE> Path to the rc file to load in interactive shells (instead of `bash.bashrc` and `~/.bashrc`) -s Read commands from standard input -t Run only one command and then exit -v, --verbose Print input when it's processed -x Print commands as they execute User interface options: --disable-bracketed-paste Disable bracketed paste --disable-color Disable colorized output --enable-highlighting Enable syntax highlighting (experimental) --input-backend <BACKEND> Input backend [possible values: reedline, basic, minimal] --debug <EVENT> Enable debug logging for classes of tracing events [possible values: arithmetic, commands, complete, expand, functions, input, jobs, parse, pattern, tokenize, unimplemented] --disable-event <EVENT> Disable logging for classes of tracing events (takes same event types as `--debug`)stderr: |
toysh | 10 exit with no args [toysh status] Expected 1 Got 0 stdout: stderr: |
dash | 11 --rcfile in non-interactive shell prints warnings stdout: ==> interactive.txt <== dash: 0: Illegal option -- ==> non-interactive.txt <== dash: 0: Illegal option --stderr: warned=1 warned=1 |
ash | 11 --rcfile in non-interactive shell prints warnings [ash stderr] Expected 'warned=1\nwarned=0\n' Got 'warned=1\nwarned=1\n' stdout: rc rc ==> interactive.txt <== ==> non-interactive.txt <==stderr: warned=1 warned=1 |
zsh | 11 --rcfile in non-interactive shell prints warnings stdout: ==> interactive.txt <== zsh: no such option: rcfile ==> non-interactive.txt <== zsh: no such option: rcfilestderr: warned=1 warned=1 |
mksh | 11 --rcfile in non-interactive shell prints warnings stdout: ==> interactive.txt <== mksh: mksh: --: unknown option ==> non-interactive.txt <== mksh: mksh: --: unknown optionstderr: warned=1 warned=1 |
ksh | 11 --rcfile in non-interactive shell prints warnings [ksh stderr] Expected 'warned=1\nwarned=0\n' Got 'warned=1\nwarned=1\n' stdout: ==> interactive.txt <== E: ksh: --: unknown option ==> non-interactive.txt <== E: ksh: --: unknown optionstderr: warned=1 warned=1 |
toysh | 11 --rcfile in non-interactive shell prints warnings [toysh stderr] Expected 'warned=1\nwarned=0\n' Got 'warned=1\nwarned=1\n' stdout: ==> interactive.txt <== sh: Unknown option 'rcfile' (see "sh --help") ==> non-interactive.txt <== sh: Unknown option 'rcfile' (see "sh --help")stderr: warned=1 warned=1 |
sush | 11 --rcfile in non-interactive shell prints warnings [sush stderr] Expected 'warned=1\nwarned=0\n' Got 'warned=1\nwarned=1\n' stdout: ==> interactive.txt <== : line : set: --rcfile: invalid option ==> non-interactive.txt <== : line : set: --rcfile: invalid optionstderr: warned=1 warned=1 |
brush | 11 --rcfile in non-interactive shell prints warnings [brush stderr] Expected 'warned=1\nwarned=0\n' Got 'warned=1\nwarned=1\n' stdout: rc ==> interactive.txt <== exit ==> non-interactive.txt <==stderr: warned=1 warned=1 |
toysh | 12 accepts -l flag [toysh status] Expected 0 Got 1 stdout: stderr: sh: Unknown option 'l' (see "sh --help") |
sush | 12 accepts -l flag [sush status] Expected 0 Got 2 stdout: stderr: : line : set: -l: invalid option |
dash | 13 accepts --login flag (dash and mksh don't accept long flags) stdout: stderr: dash: 0: Illegal option -- |
mksh | 13 accepts --login flag (dash and mksh don't accept long flags) stdout: stderr: mksh: mksh: --: unknown option |
ksh | 13 accepts --login flag (dash and mksh don't accept long flags) [ksh status] Expected 0 Got 1 stdout: stderr: E: ksh: --: unknown option |
toysh | 13 accepts --login flag (dash and mksh don't accept long flags) [toysh status] Expected 0 Got 1 stdout: stderr: sh: Unknown option 'login' (see "sh --help") |
sush | 13 accepts --login flag (dash and mksh don't accept long flags) [sush status] Expected 0 Got 2 stdout: stderr: : line : set: --login: invalid option |
bash | 14 osh --eval stdout: stderr: |
dash | 14 osh --eval stdout: stderr: |
ash | 14 osh --eval [ash stdout] Expected 'one x y z\nstatus=0 flag -c x y z\n\none x y z\nfail x y z\nstatus=42 flag -c x y z\nstatus=0\n' Got 'one -c echo status=$? flag -c "$@" dummy x y z\n\none --eval fail.sh -c echo status=$? flag -c "$@" dummy x y z\nstatus=0\n' stdout: one -c echo status=$? flag -c "$@" dummy x y z one --eval fail.sh -c echo status=$? flag -c "$@" dummy x y z status=0stderr: |
zsh | 14 osh --eval stdout: stderr: |
mksh | 14 osh --eval stdout: stderr: |
ksh | 14 osh --eval [ksh stdout] Expected 'one x y z\nstatus=0 flag -c x y z\n\none x y z\nfail x y z\nstatus=42 flag -c x y z\nstatus=0\n' Got '\nstatus=1\n' stdout: status=1stderr: E: ksh: --: unknown option E: ksh: --: unknown option |
toysh | 14 osh --eval [toysh stdout] Expected 'one x y z\nstatus=0 flag -c x y z\n\none x y z\nfail x y z\nstatus=42 flag -c x y z\nstatus=0\n' Got '' [toysh status] Expected 0 Got -6 stdout: stderr: munmap_chunk(): invalid pointer |
sush | 14 osh --eval [sush stdout] Expected 'one x y z\nstatus=0 flag -c x y z\n\none x y z\nfail x y z\nstatus=42 flag -c x y z\nstatus=0\n' Got '\nstatus=2\n' stdout: status=2stderr: : line : set: --eval: invalid option : line : set: --eval: invalid option |
brush | 14 osh --eval [brush stdout] Expected 'one x y z\nstatus=0 flag -c x y z\n\none x y z\nfail x y z\nstatus=42 flag -c x y z\nstatus=0\n' Got '\nstatus=127\n' stdout: status=127stderr: error: unexpected argument '--eval' found tip: to pass '--eval' as a value, use '-- --eval' Usage: brush [OPTIONS]... [SCRIPT_PATH [SCRIPT_ARGS]...] For more information, try '--help'. -c: command not found error: unexpected argument '--eval' found tip: to pass '--eval' as a value, use '-- --eval' Usage: brush [OPTIONS]... [SCRIPT_PATH [SCRIPT_ARGS]...] For more information, try '--help'. -c: command not found |
dash | 15 Set LC_ALL LC_CTYPE LC_COLLATE LANG - affects glob ? stdout: LC_ALL _x_ LC_ALL _x_ LC_CTYPE _x_ LC_CTYPE _x_ LC_COLLATE _x_ LC_COLLATE _x_ LANG _x_ LANG _x_stderr: |
ash | 15 Set LC_ALL LC_CTYPE LC_COLLATE LANG - affects glob ? [ash stdout] Expected 'LC_ALL _x_\nLC_ALL _x_ _\xce\xbc_\n\nLC_CTYPE _x_\nLC_CTYPE _x_ _\xce\xbc_\n\nLC_COLLATE _x_\nLC_COLLATE _x_\n\nLANG _x_\nLANG _x_ _\xce\xbc_\n' Got 'LC_ALL _x_\nLC_ALL _x_\n\nLC_CTYPE _x_\nLC_CTYPE _x_\n\nLC_COLLATE _x_\nLC_COLLATE _x_\n\nLANG _x_\nLANG _x_\n' stdout: LC_ALL _x_ LC_ALL _x_ LC_CTYPE _x_ LC_CTYPE _x_ LC_COLLATE _x_ LC_COLLATE _x_ LANG _x_ LANG _x_stderr: |
mksh | 15 Set LC_ALL LC_CTYPE LC_COLLATE LANG - affects glob ? stdout: LC_ALL _x_ LC_ALL _x_ LC_CTYPE _x_ LC_CTYPE _x_ LC_COLLATE _x_ LC_COLLATE _x_ LANG _x_ LANG _x_stderr: |
toysh | 15 Set LC_ALL LC_CTYPE LC_COLLATE LANG - affects glob ? [toysh stdout] Expected 'LC_ALL _x_\nLC_ALL _x_ _\xce\xbc_\n\nLC_CTYPE _x_\nLC_CTYPE _x_ _\xce\xbc_\n\nLC_COLLATE _x_\nLC_COLLATE _x_\n\nLANG _x_\nLANG _x_ _\xce\xbc_\n' Got 'LC_ALL _x_ _\xce\xbc_\nLC_ALL _x_ _\xce\xbc_\n\nLC_CTYPE _x_ _\xce\xbc_\nLC_CTYPE _x_ _\xce\xbc_\n\nLC_COLLATE _x_ _\xce\xbc_\nLC_COLLATE _x_ _\xce\xbc_\n\nLANG _x_ _\xce\xbc_\nLANG _x_ _\xce\xbc_\n' [toysh status] Expected 0 Got -6 stdout: LC_ALL _x_ _μ_ LC_ALL _x_ _μ_ LC_CTYPE _x_ _μ_ LC_CTYPE _x_ _μ_ LC_COLLATE _x_ _μ_ LC_COLLATE _x_ _μ_ LANG _x_ _μ_ LANG _x_ _μ_stderr: free(): double free detected in tcache 2 |
sush | 15 Set LC_ALL LC_CTYPE LC_COLLATE LANG - affects glob ? [sush stdout] Expected 'LC_ALL _x_\nLC_ALL _x_ _\xce\xbc_\n\nLC_CTYPE _x_\nLC_CTYPE _x_ _\xce\xbc_\n\nLC_COLLATE _x_\nLC_COLLATE _x_\n\nLANG _x_\nLANG _x_ _\xce\xbc_\n' Got 'LC_ALL _x_ _\xce\xbc_\nLC_ALL _x_ _\xce\xbc_\n\nLC_CTYPE _x_ _\xce\xbc_\nLC_CTYPE _x_ _\xce\xbc_\n\nLC_COLLATE _x_ _\xce\xbc_\nLC_COLLATE _x_ _\xce\xbc_\n\nLANG _x_ _\xce\xbc_\nLANG _x_ _\xce\xbc_\n' stdout: LC_ALL _x_ _μ_ LC_ALL _x_ _μ_ LC_CTYPE _x_ _μ_ LC_CTYPE _x_ _μ_ LC_COLLATE _x_ _μ_ LC_COLLATE _x_ _μ_ LANG _x_ _μ_ LANG _x_ _μ_stderr: |
brush | 15 Set LC_ALL LC_CTYPE LC_COLLATE LANG - affects glob ? [brush stdout] Expected 'LC_ALL _x_\nLC_ALL _x_ _\xce\xbc_\n\nLC_CTYPE _x_\nLC_CTYPE _x_ _\xce\xbc_\n\nLC_COLLATE _x_\nLC_COLLATE _x_\n\nLANG _x_\nLANG _x_ _\xce\xbc_\n' Got 'LC_ALL _x_ _\xce\xbc_\nLC_ALL _x_ _\xce\xbc_\n\nLC_CTYPE _x_ _\xce\xbc_\nLC_CTYPE _x_ _\xce\xbc_\n\nLC_COLLATE _x_ _\xce\xbc_\nLC_COLLATE _x_ _\xce\xbc_\n\nLANG _x_ _\xce\xbc_\nLANG _x_ _\xce\xbc_\n' stdout: LC_ALL _x_ _μ_ LC_ALL _x_ _μ_ LC_CTYPE _x_ _μ_ LC_CTYPE _x_ _μ_ LC_COLLATE _x_ _μ_ LC_COLLATE _x_ _μ_ LANG _x_ _μ_ LANG _x_ _μ_stderr: |
dash | 16 LC_ALL=invalid stdout: LC_ALL _x_ 0 err.txtstderr: |
ash | 16 LC_ALL=invalid [ash stdout] Expected 'LC_ALL _x_\n1 err.txt\n' Got 'LC_ALL _x_\n0 err.txt\n' stdout: LC_ALL _x_ 0 err.txtstderr: |
zsh | 16 LC_ALL=invalid stdout: LC_ALL _x_ 0 err.txtstderr: |
mksh | 16 LC_ALL=invalid stdout: LC_ALL _x_ 0 err.txtstderr: |
ksh | 16 LC_ALL=invalid [ksh stdout] Expected 'LC_ALL _x_\n1 err.txt\n' Got 'LC_ALL _x_\n3 err.txt\n' stdout: LC_ALL _x_ 3 err.txtstderr: |
toysh | 16 LC_ALL=invalid [toysh stdout] Expected 'LC_ALL _x_\n1 err.txt\n' Got 'LC_ALL _x_ _\xce\xbc_\n0 err.txt\n' [toysh status] Expected 0 Got -6 stdout: LC_ALL _x_ _μ_ 0 err.txtstderr: free(): double free detected in tcache 2 |
sush | 16 LC_ALL=invalid [sush stdout] Expected 'LC_ALL _x_\n1 err.txt\n' Got 'LC_ALL _x_ _\xce\xbc_\n0 err.txt\n' stdout: LC_ALL _x_ _μ_ 0 err.txtstderr: |
brush | 16 LC_ALL=invalid [brush stdout] Expected 'LC_ALL _x_\n1 err.txt\n' Got 'LC_ALL _x_ _\xce\xbc_\n0 err.txt\n' stdout: LC_ALL _x_ _μ_ 0 err.txtstderr: |