[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ANN] guile-bash

From: Dmitry Bogatov
Subject: [ANN] guile-bash
Date: Sun, 8 Feb 2015 01:45:41 +0300
User-agent: Mutt/ (2013-10-16)


I would like to anounce my library, guile-bash.  With it, you can write
your bash functions in Scheme, like this:

(use-modules (gnu bash))
(define-bash-function (dtach-start-emacs)
  (unless (file-exists? "/tmp/emacs.dtach")
    #$[dtach -n /tmp/emacs.dtach emacs]))

This strange #$ is reader macro. To give a try, you should download
it from, like this:

$ git clone git://
$ cd guile-bash
$ autoreconf -if
$ ./configure
$ make
$ make install

Make sure, that directory, where Guile modules are installed
are in GUILE_LOAD_PATH. Locate
and do in your bash

$ enable -f /path/to/ scm

Now you can copy snippet above to a file and make

$ scm /some/file/with/code.scm

Now you should have `dtach-start-emacs` function availiable.  To get
overview of what is availiable, see lisp/gnu/bash.scm Functions defined
with `define-ffi` and `define-public` are of interest.

About reader macro.  To get variable value, write `#$HOME`, to set

(set! #$HOME).

#$[echo foo] is just eval
#$(echo foo) captures output.

If you use Debian GNU/Linux, debianization is ready on

I am very interested in your opinions.

[please keep me in CC]

Best regards, Dmitry Bogatov <address@hidden>,
Free Software supporter, esperantisto and netiquette guardian.
GPG: 54B7F00D

Attachment: pgpeXPAJjlFPT.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]