This is a toy shell I wrote to become more familar with C.
- Interactive commands (less, vi, etc).
- Piping.
- I/O redirection.
- Using environment variables as args.
- Records command duration with SQLite (because why not).
- Shell history.
- File globbing.
- More granular I/O redirection (choosing between stdout and stderr).
- More operators.
- Job control.
- Make less buggy.
- CMake.
- GNU ReadLine.
- SQLite Version 3.
- Attractive Chaos' Klib.
Bring in Git submodules.
git submodule init
git submodule update
Run build.sh to invoke the CMake build.
sh build.sh [BUILD_TYPE:debug/release/asan/ubsan/scan]
To execute a single command.
build/[BUILD_TYPE]/tsh [COMMAND]
To run Tsh as the active shell (Ctrl-D to exit).
build/[BUILD_TYPE]/tsh
To run an Address Sanitized build.
ASAN_OPTIONS="symbolize=1" build/asan/tsh
To run an Undefined Behaviour Sanitized build.
UBSAN_OPTIONS="print_stacktrace=1" build/ubsan/tsh
cd: Change current working directory.help: Display help text.exit: Exit the shell.tshstats: Display command duration information (backed by SQLite).history: Display the shell history (backed by SQLite).