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
- Host: GitHub
- URL: https://github.com/yekuuun/tinyshell
- Owner: Yekuuun
- Created: 2025-05-17T18:51:56.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-28T12:34:30.000Z (about 1 year ago)
- Last Synced: 2025-05-28T12:38:36.817Z (about 1 year ago)
- Topics: c, linux, make, minishell
- Language: C
- Homepage:
- Size: 151 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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`

## Links & ressources