DumanShell is a functional Unix shell built from the ground up in C to explore low-level systems programming. It bypasses high-level abstractions to interact directly with the kernel for process management and I/O control. The latest V1.0 release introduces a robust I/O redirection system, completing the shell's core functionality.
For a detailed walkthrough of the "why" and "how" behind the implementation logic and engineering challenges, please see the DEVLOG.md.
The V1.0 release marks the completion of the fundamental Unix shell features:
- Process Management: Full support for external command execution using the
fork-exec-waitlifecycle. - Multi-Stage Pipelines (|): Recursive implementation of pipelines using
pipe()anddup2()for seamless inter-process communication. - I/O Redirection: New support for input redirection (
<), output overwrite (>), and output append (>>) with proper file descriptor restoration. - Raw Mode Input Engine: Custom terminal handling via
termios.hto support manual cursor tracking, backspaces, and real-time history scrolling. - Non-Destructive History Scrolling: Uses a Circular Array for O(1) performance, allowing you to modify history entries locally without overwriting the original logs.
Build: make
Run: ./dumanshell
The initial process management logic (fork/exec loop) was inspired by Manoj Singh Negi's Shell Tutorial. The terminal raw mode handling (in part), the history buffer logic, pipe handling, I/O redirection, and the line editing features were researched and implemented independently.