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

https://github.com/yekuuun/tinyshell

aiming to recreate a minimalist shell for fun
https://github.com/yekuuun/tinyshell

c linux make minishell

Last synced: about 1 year ago
JSON representation

aiming to recreate a minimalist shell for fun

Awesome Lists containing this project

README

          

```C

_____ _ ____ _ _ _
|_ _(_)_ __ _ _/ ___|| |__ ___| | |
| | | | '_ \| | | \___ \| '_ \ / _ \ | |
| | | | | | | |_| |___) | | | | __/ | |
|_| |_|_| |_|\__, |____/|_| |_|\___|_|_|
|___/

--a minimalist shell made from scratch--

```

**TinyShell** is a minimal & custom-built Unix shell written in pure C. It represent my first "unix" project after switching from Windows dev. It supports essential shell functionnalities with builtin commands & custom binaries.

>[!Important]
>This repo contains samples I wroted. It may not be perfect so don't blame me if you see potentials errors.

>[!Warning]
>I had habit to use C under windows env so don't blame me if you see Windows synthax haha.

## ✨ Core features

🟢 **Command lexing & parsing** : using lexer synhtax interpretation + quote handling + AST implementation for commands parsing.

🟢 **Signals interruptions handling** : handling interruptions like CTRL-c etc.

🟢 **Builtin functions** : base builtins functions `exit, echo, clear, history, pwd`

🟢 **Working on custom core functions** like `ls, cat, mkdir, touch` etc for bringing more fun calling custom binaries like a real shell.

🟢 **Command execution** : main core command execution using native programs & custom programs. => execvp usage.

🟢 **Root detection** : detects if current user is in root mode

🔴 **Handling more options** : >>, <<, &&

🔴 **Handling env** : Handling environment variables

🔴 **Auto-completion** : adding auto-completion with tab


## ▶️ Running tinyshell

`make && ./tinyshell`


DebugInfo

## Links & ressources

Advanced programming in the unix environment

ManBell 42 minishell project

AST Algorithm