Bob's finally coming out of his shell.
bsh __ ___ | "---. ." ". -o) | | <|_______|/` |__,---; UU UU ====|_______| Welcome to Bob shell.
See CONTRIBUTING.md for more info on running the test suite, contributing to the project, and improving the documentation.
macOS and Ubuntu are currently supported and tested. This project requires CMake version 2.8 or higher to build.
brew install cmake
sudo apt-get install cmake libbsd-dev libreadline-dev pkg-config
After these dependencies are installed:
git clone https://github.com/rgardner/bsh cd bsh mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Debug -GNinja .. # Build cmake --build . # Run cmake --build . --target run
Doxygen is required to build documentation:
brew install doxygen
sudo apt-get install doxygen
To generate the documentation:
mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=Debug -GNinja .. cmake --build . --target doc # open doc/html/index.html
CMake is the build system used for this project. Originally, this started as
a simple Makefile, but it grew more complicated until eventually
the more viable option.
libbsd-dev is required on Ubuntu to get access to
two functions that make working with strings much easier. This
paper does a good job of
explaining the design intentions of these functions.
libreadline-dev is required on Ubuntu to embed
readline in an
readline is only used to grab text from the user; its history
capabilities are not used and are instead re-implemented as a learning
pkg-config is required on Ubuntu to help install
libbsd. It makes it
easier to port this project to other systems because it helps us avoid
doxygen is a tool to generate documentation. Source comments are annotated
using a JavaDoc-like style, which
doxygen uses to create HTML and PDFs.
check is the unit-testing framework chosen for this project. It is one of
the most popular C unit-testing frameworks and works well with
Feature Road Map
write the parser basic shell support Extra history features
history -s numand
dirs, pushd, popd
- shell scripting:
- tab completion and command prompt editing
- up and down arrows to scroll through history list
- relax constrains (allow
- terminal support
- port to Windows
These resources have been invaluable to me while working on this project:
- Cornell CS414 Summer 2004 by Jeanna Matthews
- GNU History Library
- Bash source code
- Implementing a Job Control Shell
- The C Programming Language, 2nd Edition
The awesome "geek tortoise" ascii art was found on Retrojunkie.