Skip to content

soham004/Cshell-Cshore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐚 CShell-CShore

A simple Unix shell written in C. CShell-CShore is a lightweight command-line shell that reads user input, tokenizes commands, and executes basic shell operations.

Features

  • Reads and parses user input commands.
  • Supports quoted arguments (e.g., "ls -la" is treated as a single argument).
  • Implements a simple command-line interface with a working directory prompt.
  • Debug mode for verbose output (--debug flag).
  • Has command history accessible by using arrow up or down keys.
  • Persistent command history saved to ~/.cshell_history.
  • Auto-completion for file names on Tab, only the last argument is sent for auto-completion and then concatenated with the main buffer.

Installation

  1. Clone the repository:
git clone https://github.com/soham004/Cshell-Cshore.git
cd CShell-CShore
  1. Compile the shell:
make

Usage

Run the shell:

./cshell

Run in debug mode:

./cshell --debug

The shell will display the current working directory followed by > as a prompt, allowing you to enter commands.

Roadmap

  • ✔️ Add support for executing system commands via shell_execute.
  • ✔️ Support built-in commands like cd, exit, etc.
  • ✔️ Implement history.
  • ✔️ Implement persistent history.
  • ✔️ Add support for auto completion for file names on Tab.
  • Add coloured output for better readability.

License

This project is licensed under the Unlicense.

About

A simple Unix shell written in c using standard c libraries

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors