- This is a basic shell implemented using
syscalls
and C++ STL templates. - C/C++ provides headers such as
unistd
,pwd.h
,sys/types.h
, etc to make system calls and other process calling much easier.
- First, make sure you have make installed.
sudo apt-get install make
- Clone this repo to your computer
git clone https://github.com/Pk13055/cpp-shell.git
cd cpp-shell
make
- Now, provided your make succeeds, you will have a file
shkell
in this folder. - Finally, run
./shkell
-
When adding a new feature/method, make sure you follow the following steps.
- (optional) Define a new header file if it is a completely new feature.
- The header file(s) should only have class and function definitions.
- Variables can be included but should be of the form
extern ...
. - Now, make a
*.cpp
file, and#include<yourheader>
in that file. Here, the class and function definitions can be written. Additionaly, any variables declared in the header file must be declared here again sansextern
. - At the end now, include your header file in the
main.cpp
as#include "yourheader"
.
-
Open a pull request describing your feature addition.
Most systems come installed with `libreadline`, a package used for the autocompletion and other facilities. Install the following incase you're presented with an error
` sudo apt-get install libreadline6 libreadline6-dev`