Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

README

        

# minishell - As beautiful as a shell
## [@eschirni](https://github.com/eschirni) and [@tzeck](https://github.com/tzeck1)

Screenshot 2022-02-28 at 3 29 02 PM

## 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