Skip to content

arkneid/clash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐚 Clash - C Language Shell

Clash is a simple command-line shell written in C. It lets you:

  • Run basic terminal commands
  • Change directories with cd
  • Explore how a shell works under the hood

πŸš€ How to Use

1. Compile the shell

gcc -Wall -Wextra -Werror src/* -o clash

2. Run it

./clash

You’ll see a prompt like:

clash -->

Now you can type commands!

πŸ“‚ Examples

clash --> cd /home/user

clash --> ls
Documents  Downloads  file.txt

clash --> cd ..
/home

πŸ“Œ Notes

  • 🏠 cd with no argument takes you to your home directory
  • ❓ If you type an unknown command, it will try to run it as a program
  • πŸ“› If a folder or command doesn’t exist, an error is shown

πŸ›  To Improve

Planned future features:

  • Support for pipes (|)
  • Support for **(&&, ;)
  • Support for redirection (>, <)
  • Support for background processes (&)
  • Command history
  • Implementation of the PS1 variable

πŸ‘€ Author

Made by: Arkneid GitHub: TBD

πŸ“„ License

This project is open-source under the MIT License.

About

Clash is a simple command-line shell written in C. It is plugin based shell in order for you to add your custom additions without rebuilding the binary.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages