https://github.com/f0rkr/minishell
Making a shell using dummy C.
https://github.com/f0rkr/minishell
c descriptors minishell shell zsh
Last synced: about 1 month ago
JSON representation
Making a shell using dummy C.
- Host: GitHub
- URL: https://github.com/f0rkr/minishell
- Owner: f0rkr
- Created: 2020-04-23T20:46:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-30T15:50:15.000Z (about 5 years ago)
- Last Synced: 2025-01-27T23:14:27.186Z (over 1 year ago)
- Topics: c, descriptors, minishell, shell, zsh
- Language: C
- Homepage:
- Size: 1.23 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://man7.org/linux/man-pages/man5/termcap.5.html)*
# How to run it
```shell
f0rkr@shell$ make
f0rkr@shell$ ./minishell
wsh :: /Users/f0rkr/Documents/minishell » wesh a sat
```
# Teammate
- [teslazap](https://github.com/OussamaElouarti)
# Resources
https://www.gnu.org/software/bash/manual/bash.html