A practice implementation of a Unix shell in modern C++.
- different sources
- CLI -
ppsh --command "cmd"
- script -
ppsh script.sh
- interactive -
ppsh
- CLI -
- pipes -
cmd1 | cmd2
- redirections -
cmd1 <x >y; cmd2 >>z
- builtins -
cd
andexit
$ [docker|podman] run --interactive --tty docker.io/fackop/ppsh
$ git clone https://github.com/papundekel/ppsh
$ cd ppsh
$ ./build.sh ./ <build-path>
$ cmake --install <build-path> --config Release --prefix <your-installation-path>
$ <your-installation-path>/ppsh
Boost
>=1.74readline
>=8.2
Boost Spirit X3
- script parsingBoost Program Options
- CLI parsingreadline
- interactive mode
CMake
- build systemclang-format
- code formattingpre-commit
- git commit hooks
pytest
- integration testspytest-asyncio-cooperative
- tests run asynchronously
Python
>=3.8pre-commit
>=3.5CMake
>=3.21GCC
>=13- + all runtime dependencies
$ python -m venv .venv/
$ source .venv/bin/activate
$ pip install -r requirements-dev.txt
$ pre-commit install
$ pytest tests/tests --verbose --showlocals
pytest
>=7.4pytest-asyncio-cooperative
>=0.31
$ pip install -r tests/requirements.txt