Skip to content

f0rkr/minishell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minishell

Coding a shell from scratch using low level C was one of the most powerfull project I made, constructing all those building block of a shell from parsing commands through forking process creation and synchronisation, managing pipes and executing it. ✨

it's called wesh shell. aka Wesh a sat

Options created

Minishell runs executables from an absolute, relative or environment PATH (/bin/ls or ls), including arguments or options. ' and " work the same as bash.

You can separate commands with ;, as well as use redirections > >> < and pipes |.

Environment variables are handled, like $HOME, including the return code $?.

Finally, you can use Ctrl-C to interrupt and Ctrl-\ to quit a program, as well as Ctrl-D to throw an EOF, same as in bash.

A few of the functions are "built-in", meaning we don't call the executable, we re-coded them directly. It's the case for echo, pwd, cd, env, export, unset and exit.

You can use arrow keys to edit commands and iterate through last executed ones (history). managed with termcap

How to run it

f0rkr@shell$ make
f0rkr@shell$ ./minishell
wsh :: /Users/f0rkr/Documents/minishell » wesh a sat

Teammate

Resources

https://www.gnu.org/software/bash/manual/bash.html

Releases

No releases published

Packages

No packages published