https://github.com/2kabhishek/cshell
Not a seashell ⛵🐚
https://github.com/2kabhishek/cshell
bash c diy operating-system shell unix
Last synced: about 2 months ago
JSON representation
Not a seashell ⛵🐚
- Host: GitHub
- URL: https://github.com/2kabhishek/cshell
- Owner: 2KAbhishek
- Created: 2022-04-27T18:07:51.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T07:41:58.000Z (over 3 years ago)
- Last Synced: 2025-03-01T12:48:32.001Z (over 1 year ago)
- Topics: bash, c, diy, operating-system, shell, unix
- Language: C
- Size: 45.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## What is this
cshell is an alternative to the standard sh shell written entirely in c and all in a single file within ~500 LOC.
It supports pipes, redirections, history, and more. Comes with a customized prompt.
## Inspiration
Most Operating Systems classes have a project for creating a shell. I never got to around to do that.
This is my shot at creating my own shell.
## Prerequisites
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of `gcc, make`
## Getting cshell
To install cshell, follow these steps:
```bash
git clone https://github.com/2kabhishek/cshell
cd cshell
make cshell
```
## Using cshell
You can link the cshell executable to your $PATH or just run it from the command line.
```bash
./cshell
```
This will start the shell and display the a help message along with the prompt.
You can use it like any other shell.
## How it was built
cshell was built using `c`
## Challenges faced
- Struggled somewhat in the begining to handle signals, but eventually got it working.
## What I learned
- Learned a lot about `c` and it's different syscalls.
- Understood the internal workings pipes and redirections.
## What's next
Clean up the code and make it more readable, add more features, and make it more robust.
Hit the ⭐ button if you found this useful.
## More Info