https://github.com/zachwhaley/zh
An exercise in writing a unix shell
https://github.com/zachwhaley/zh
Last synced: over 1 year ago
JSON representation
An exercise in writing a unix shell
- Host: GitHub
- URL: https://github.com/zachwhaley/zh
- Owner: zachwhaley
- Created: 2016-08-18T01:58:15.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-23T21:16:19.000Z (almost 9 years ago)
- Last Synced: 2025-01-22T19:11:36.626Z (over 1 year ago)
- Language: C
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zh
zh is an exercise in writing Unix shells, following [A Unix Shell in Ruby](http://www.jstorimer.com/blogs/workingwithcode/7766107-a-unix-shell-in-ruby).
Each shell should have four stages of development:
1. Running commands
- Display a prompt
- Read a command from stdin
- Run the command as its own process (fork and exec)
2. Builtin commands
- Change directory using a builtin `cd` command
- Exit the shell using a builtin `exit` command
3. Environment variables
- Display current directory in prompt
- Change your `PATH` using a builtin `set` command
4. Configuration
- Read simple commands from a config file
5. Pipelines
- Implement piping, e.g. `ls | grep zh`