Skip to content

2KAbhishek/cshell

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

cshell

License People Stars Forks Watches Last Updated

Not a seashell β›΅πŸš

cshell Demo
cshell screenshot

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:

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.

./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

Releases

No releases published

Sponsor this project

 

Packages

No packages published