https://github.com/thimc/rsh
simple shell interpreter in go
https://github.com/thimc/rsh
interpreter shell
Last synced: about 2 months ago
JSON representation
simple shell interpreter in go
- Host: GitHub
- URL: https://github.com/thimc/rsh
- Owner: thimc
- License: mit
- Created: 2024-10-22T18:49:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-27T11:44:05.000Z (over 1 year ago)
- Last Synced: 2025-04-05T13:14:39.086Z (about 1 year ago)
- Topics: interpreter, shell
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rsh
Shell interpreter written in go, inspired by [Tom
Duff](https://en.wikipedia.org/wiki/Tom_Duff)'s simple shell (ssh.c).
rsh is capable of:
* simple commands
* file patterns (`?` and `*`)
* quoting ('...' and \c)
* continuation with `\` at end of line
* redirection (`>` and `<`)
* pipelines
* synchronous and asynchronous execution (`;` and `&`)
* conditional execution (`&&` and `||`)
* only built-ins are `cd`, `path` and `exit`
* nothing else
It is very much work in progress so random panics are expected.
It is _not_ ready for daily use just yet.
Grammar is roughly:
cmd: simple
| simple | cmd
| simple ; cmd
| simple & cmd
| simple && cmd
| simple || cmd
simple:
| simple word
| simple < word
| simple > word
| simple < word1 > word2
| simple &
## TODO
* probably something else