A lightweight Unix-like shell implementation in C, designed for both Windows and Unix environments.
- Basic command execution
- Cross-platform support (Windows and Unix-based systems)
- Windows
lscommand (automatically translates todir) - Custom line reading and parsing implementation
- Simple error handling
- Built-in commands (
cd,help,exit) - Command history
- Support for pipelines (
|) - Input/output redirection (
<,>,>>) - Background process execution (
&) - Signal handling (
Ctrl+C)
- Tab completion
- Environment variable support
To compile Chell, run the following command in a terminal:
makemakeThis will generate an executable named chell on Unix/macOS or chell.exe on Windows.
After building, you can start the shell by running:
./chell # On Unix/macOS
./chell.exe # On WindowsYou should see the prompt:
chell>
You can now enter commands as you would in a typical shell.
- Any system command available in your PATH
- Special handling for
lson Windows (converts todir) exit- Exit the shellcd [directory]- Change the current directoryhelp- Display help informationhistory- Show command history- Piping (Using |)
- i/o redirection
- Background processing (using &)
- Signal Handling (Ctrl + C)
chell.c- Main shell implementation with command parsing and executionchell_extensions.c- Additional features and built-in commandsmakefile- Build configuration
- If you get "Permission denied" when compiling on Windows, ensure
chell.exeis not currently running - Use
rm -f chell.exebefore runningmakeif you encounter compilation issues
Contributions are welcome! Feel free to submit pull requests or open issues for new features, bug fixes, or improvements.