Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eschirni/minishell
As beautiful as a shell.
https://github.com/eschirni/minishell
42 42heilbronn bash c fork minishell readline reinventing-the-wheel shell unix unix-signals
Last synced: 5 days ago
JSON representation
As beautiful as a shell.
- Host: GitHub
- URL: https://github.com/eschirni/minishell
- Owner: eschirni
- Created: 2022-01-08T19:22:24.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-03-03T17:29:03.000Z (over 2 years ago)
- Last Synced: 2023-12-31T18:22:56.809Z (11 months ago)
- Topics: 42, 42heilbronn, bash, c, fork, minishell, readline, reinventing-the-wheel, shell, unix, unix-signals
- Language: C
- Homepage:
- Size: 374 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# minishell - As beautiful as a shell
## [@eschirni](https://github.com/eschirni) and [@tzeck](https://github.com/tzeck1)
## Description of the subject
Thanks to Minishell, you’ll be able to travel through time and come back to problems
people faced when Windows didn’t exist.
We have restrictions which functions we're allowed to use (see [subject pdf](https://github.com/tzeck1/minishell/files/8154030/minishell.pdf)). In addition we have to format our code according to the schools [Norm](https://github.com/tzeck1/minishell/files/8154641/norm.pdf)
#### **Full subject:** [minishell.pdf](https://github.com/tzeck1/minishell/files/8154030/minishell.pdf)## Installation
1. You might have to install the readline libary with `brew install readline`
2. To create the execuatable run `make`
3. To start the programm: `./minishell`## What we've implemented
**-Own functions:**
cd, pwd, env, exit, unset, export, echo (all other bash commands are implemented with execv)
**-A working history:**
arrow key up/down
**-Single and double Quotes**
**-Redirections:**
< (input), > (trunc), >> (append) and << (heredoc)
**-Pipes:**
single and multible pipe(s), combination with redirections possible
**-Environment Variables**
**-Signals:**
ctrl-C, ctrl-D and ctrl-\## Structure
**1. Lexer:** tokenization of the input string e.g. "CMD, ARGUMENT, PIPE, CMD, ARGUMENT, TRUNC, FILE"
**2. Parser:** filtering parser errors and quotes, redirects output for pipes and redirections, etc.
**3. Executor:** executes commands with arguments