Compare that to this beauty: http://ftp.scsh.net/pub/scsh/0.6/scsh-manual.ps.gz pp. 10 onward. It's such a pity scsh is dead ...
The API seems to have changed a bit since I last used it, so not sure how nice the current version is. It's also apparently used by a shell-like language called Rash, but I've not used that either https://docs.racket-lang.org/rash