Command line shell for Plan 9 operating system compatible with Linux/Unix.
Originally developed as a practice for the Operating Systems course at Rey JuanCarlos University at Spain, my intention is in the future add more features to become it more Unix-user friendly. Think of it more like ash than like rc.
This code can also be found at https://github.com/piranna/P9sh
Well, at a first point because it's focused on Plan 9 (althought it compiles under Linux with Plan9port, and maybe i would do a native Linux/Unix version in the future), but also because P9 sound similar to Piranna :-P
- Low size
- Low memory footprint
- Clean and very legible code
- Highly modular
- Full of comments :-D
- Input buffered
- Support for built-ins "a-la" BusyBox
- cd
- Pipelines
- Stdin & stdout redirection
- Commands in background
- heredocs (using brackets are identifiers)
- environment vars (set & expansion)
- redirection to environment var
- echo command (needed by heredoc implementation)
- -Nothing- (obviusly... :-D )
A built-in in P9sh is simply a function with a C-main sign, so they are really easy to develop:
- copy&paste the original source code of the program to embed somewhere in the P9sh source tree (it's own file it's not a bad idea... :-) )
- rename the built-in main function to something different... and meaningful
- add an entry for the new built-in at getBuiltin() function
- ...et voila! :-D