The shell
s – speaks Bash, so your scripts just keep running. And Tab knows every command.
s interactive
s skript.sh ARG … run a script
s -c 'befehl' one command
s -e -x -u -o pipefail like in bash
Bash scripts run
Almost everything you know from Bash is there: variables, pipes, if/for/while/case,
functions, [[ … ]] with patterns and =~, arrays and associative arrays, $(( )),
here documents, <(befehl), all ${x…} expansions, set -euo pipefail,
select, name references (declare -n), extglob and **/.
The proof of the pudding: Homebrew's brew and git filter-branch run under
s with the same output as under bash. Every case is tested against bash 5.
Typing is fun
- Tab completes commands (with long and old names and description), options (with explanation), paths,
variables – and knows from the
spec whether an argument is a path, folder, process or user.
Tab twice shows the list.
- History with the arrow keys, Ctrl+R searches it,
!! and !$ work too.
Saved in ~/.s_history.
- The usual keys: Ctrl+A/E/K/U/W/Y,
Alt+B/F, Alt+. fetches the last word.
- Typo?
s suggests the closest name: “did you mean …?”
- Old names:
cp, mv, ls … automatically become c, m, l.
Startup file: ~/.src. Messages come in German, on one line. The prompt is benutzer@rechner:ordner $ when you're logged in (e.g. over SSH), otherwise just ordner $ – your own prompt via PS1 like in bash.
What's (still) missing
Job control (fg, bg, Ctrl+Z), coproc, read -t,
ulimit, times, caller, wait -n.
complete is accepted but has no effect – s uses the specs after all.
Where it runs
On NULLos itself! If /bin/s exists, the kernel starts the shell right at boot.
Pipes, loops, $( ) and functions work there. exit takes you back to the small
kernel shell. On the Mac: all tests green.
For small devices without fork there is a version that starts programs through a single system call.