Velashell (vsh) is a bash-styled shell school project completely written from scratch in C with very limited access to libraries and tools. We worked on it with 5 people for a total duration of around 5 months.
- To complete the final project in our school's pre-internship UNIX branch.
- Learn a lot more about the inner workings of the UNIX system.
- Learn about all the different type of shell implementations.
- Learn how to write our own lexer from scratch in C (no tools allowed).
- Learn how to write our own parser from scratch in C (again, no tools allowed).
- Learn how to write nice and clean code.
- To create a stable and complete UNIX shell.
Install:
make && make clean
Run:
./vsh
- The shell can not leak in any way.
- In no way can the shell quit in an unexpected manner (e.g. segfault).
- We may only use the following
libc
functions, anything else is prohibited:- the whole
man 2
section malloc
,free
,opendir
,readdir
,opendir
,getcwd
,signal
,exit
,isatty
,ttyname
,ttyslot
,getenv
,tcsetattr
,tcgetattr
,tgetent
,tgetflag
,tgetnum
,tgetstr
,tgoto
andtputs
.termcaps
- Instead of the standard
libc
library, we use our own library functions (likeft_printf
instead ofprintf
). We made all these functions in earlier projects at our school (you can check them out atsrcs/libft
).
- the whole
- The terminal must be clean and not display gibberish.
- Error monitoring without using
errno
- Prompt display
- Complete management of input
- Handle terminal resizing
- (Multiline) line edition
- Redirection with the following operators:
>
>>
<
<<
>&
<&
- Control operators:
|
||
&
&&
;
- Pipelines
- Internal shell variable monitoring
- Job control monitoring (WIP)
- Globing (WIP)
- Signal monitoring
- Quoting through
"
,'
, and\
- Basic parameter expansion
- Complete management of command history (WIP)
- Alias management
- Hash table
- Autocomplete
- Builtins:
echo
cd
fc
env
set
unset
exit
export
history
alias
unalias
type
hash
- A manual page called
vsh.1
The VSH manual contains a thorough description of our shell.
Run:
man ./vsh.1
Because we want to make sure we have a good experience working on this project together, we setup a more advanced github workflow. Please keep the following things in mind while pushing to github.
- Every feature has its own branch, which will be merged via a pull request on Github.
- The master branch is the stable version.
- We want to test as much of the code as possible, so make sure to write tests for the code you commit.
- Have atleast 2 team members review your code before merging to master.
- Commit messages have to be in English, they should also make sense. Especially while merging.
Jorn Brinksma, Marijn van Heesewijk, Oscar Mulder, Rob Kuijper, Thijs de Jong