Skip to content

Instantly share code, notes, and snippets.

@noisesmith
Created February 10, 2018 22:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noisesmith/684e09a77ca4390f03fd2e53af1d5464 to your computer and use it in GitHub Desktop.
Save noisesmith/684e09a77ca4390f03fd2e53af1d5464 to your computer and use it in GitHub Desktop.
simple scsh usage in guile
+justin@fuckmonkey:~/guile$ rlwrap guile -L guile-scsh/
GNU Guile 2.2.2.302-98fc9
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
+scheme@(guile-user)> (use-modules (scsh syntax) (scsh scsh) (ice-9 receive))
+scheme@(guile-user)> (use-modules (scsh run-extras))
+scheme@(guile-user)> (receive (status out err)
(run/collecting (1 2) (cat /tmp/foo))
(list 'status status 'out (port->string out) 'err (port->string err)))
$1 = (status 256 out "" err "cat: /tmp/foo: No such file or directory\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment