Skip to content
A Unix shell embedded in scheme
Scheme C Other
Branch: master
Clone or download
roderyc Revert "Add missing use of DESTDIR in (thanks to Santiago…
… Pelufo)."

This reverts commit cb44594.

The $2 (lib) arg to build-image should always point to its final resting place.
Latest commit 1144324 Aug 20, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
build More sane fix for here strings. Jul 6, 2013
c Don't set the write port to nonblocking mode in scheme_pipe. Jan 10, 2015
doc Add subsections to the Filesystem section in System Calls. Aug 27, 2014
rx @ d3231ad
scheme Add write+append+create to scsh-fdports-interface. Fixes #27. Sep 26, 2014
test Document file-info and friends. Introduce file:*. Jul 26, 2014
.gitignore Ignore .sexpr files from constance. Aug 14, 2011
.gitmodules Get rid of dep on constance. That was a bit half baked. Oct 14, 2012
COPYING Add COPYING notice. Oct 27, 2015 Revert "Add missing use of DESTDIR in (thanks to Santiago… Aug 20, 2016 Bump required scheme48 version to 1.9.2. Apr 13, 2014
aclocal.m4 Use s48's PIC checking code. Use that value in CFLAGS. Dec 10, 2010
config.sub Add AC_CANONICAL_HOST to so that S48_DYNAMIC_EXTERNALS w… Oct 24, 2010 Add --with-scheme48 option to ./configure, to indicate scheme48 location Mar 19, 2013
install-sh Preliminary switch to the GNU build system. Oct 21, 2010


Scsh is a unix shell embedded in Scheme. What does that mean? Well, unix shells are powerful tools. They allow a user to concisely specify her commands and the communications between them (piping, redirecting, &c.). When she needs to do something more complex than running a set of commands with known inputs, however, things become complicated. General programming with sh can be unpleasant and error prone, to say the least.

Scheme is a simple, expressive general programming language. A user with some taste may want to use it to wield her computing machine. For simple commands, however, it is not the most concise. At the scale of the command line, even the overhead of parentheses matters. It would be nice to use each of these languages where their strengths lie.

Scsh is the solution. It allows the user to write commands in a language within Scheme that follows the unix way, but also allows her to specify more complex commands with the elegance of Scheme.

Getting Started


In order to run scsh, you'll need to be running on a POSIX complient operating system, the gnu build system, and scheme48 1.9.2

Installing scheme48 1.9.2

If scheme48 1.9.2 is not available in a package manager for your operating system, follow the instructions for installing from the source distribution here

Building scsh

Within a fresh checkout of scsh, run the following commands

$ git submodule update --init
$ autoreconf
$ ./configure
$ make

That'll pull all the scheme dependencies and build scsh. To try scsh before installing, run ./go from that same directory. That'll open up a repl with standard r5rs scheme in the environment, scsh's command language, and a large posix library (docs to come). To run scsh's test suite, run make test.

Installing scsh

Run make install to install scsh on your system. Standard gnu build system rules apply. So, for instance, if you'd like to install to a location other than the default (usually /usr/local/), rerun ./configure the appropriate flags.

You can’t perform that action at this time.