42sh 1.0.0
Create a shell in C
|
The 42sh is a project carried out by groups of 5 (see Contributors, during our 1st year in EPITECH Grand Ecole program.
Its purpose is to recreate in C a Unix shell based on TCSH.
In addition, we've taken inspiration from Powerlevel10k for our shell prompt.
You can run 42sh like this :
You can execute script with 42sh like this :
You can also add the 42sh to the shebang of a script, and when you run the script it will use the 42sh.
For more information, please see the help section.
Our 42sh includes many of the features found in TCSH :
Percentage
Numbers of tests
Crash
basic tests
100%
4/4
No
path handling
100%
5/5
No
setenv and unsetenv
100%
2/2
No
builtin cd
100%
3/3
No
line formatting (space and tabs)
100%
8/8
No
error handling
100%
6/6
No
separator
100%
1/1
No
simple pipes
100%
3/3
No
advanced pipes
100%
6/6
No
redirections
100%
5/5
No
advanced manipulations
100%
3/3
No
&& and || tests
100%
3/3
No
globbing
100%
1/1
No
var interpreter
66,7%
2/3
No
inhibitor
100%
2/2
No
magic quotes
0%
0/3
No
alias
100%
4/4
No
scripting
0%
0/1
No
foreach
0%
0/1
No
which
100%
2/2
No
where
100%
2/2
No
if
0%
0/2
No
repeat
100%
1/1
No
parenthesis
0%
0/1
No
Results
87,5%
63/72
No
Functional tests were carried out with a bash tester and unit tests using criterion.
Unit tests are still to be performed, but a large part of the code is already covered:
You can run the tester with this command :
You can compile the project and run the tester with this command :
You can compile the project and run the unit tests with this command :
For more details, please click here.
You can compile the project with this command :
If you want to debug the program, you can compile the project with this :
If you want clean the project, you can run this command :
You can clean and compile the project with make re
and for debugging make re_debug
You can compile the unit tests with this command :
The documentation is accessible here.
You can generate the documentation with this command :
You need multiple package for generate them :
make tests_run
.[+]
or [-]
or [~]
followed by a message[+]
: Added functionality[-]
: Delete feature[~]
: Feature modificationOf course, in exceptional cases, we may depart from these rules.
For this project, we were a group of 5 people. Here are the people in the group: