https://github.com/samdphillips/racket-rkshell
Some racket shell hackery
https://github.com/samdphillips/racket-rkshell
Last synced: 3 months ago
JSON representation
Some racket shell hackery
- Host: GitHub
- URL: https://github.com/samdphillips/racket-rkshell
- Owner: samdphillips
- Created: 2020-01-31T22:58:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-25T18:52:25.000Z (over 5 years ago)
- Last Synced: 2025-01-30T11:42:20.166Z (over 1 year ago)
- Language: Racket
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rkshell
`rkshell` is a lang that slightly subverts the normal Racket reader. When the reader reads a term,
```
#{/usr/bin/ssh -l user host.example.com $remote-command}
```
it turns it into
```
(#%rkexec /usr/bin/ssh -l user host.example.com $remote-command)
```
The default binding of `#%rkexec` is a macro that in this case expands to,
```
(apply (rkexec-runner) "/usr/bin/ssh" "-l" "user" "host.example.com" remote-command)
```
`rkexec-runner` is a parameter that by default is bound to [`system*`][system-doc-ref]. Because it
is a parameter you can make it do anything you want really.
[system-doc-ref]: (https://docs.racket-lang.org/reference/subprocess.html?#%28def._%28%28lib._racket%2Fsystem..rkt%29._system%2A%29%29)