Gash is a POSIX-compatible shell written in Guile Scheme, designed to bootstrap Bash as part of the Guix bootstrap process.
  • Scheme 92.3%
  • Makefile 3.8%
  • Shell 3.3%
  • M4 0.6%
Find a file
Ludovic Courtès c0dd1f81d2
All checks were successful
GNU Guile 2.2 / build (push) Successful in 1m34s
GNU Guile 3.0 / build (push) Successful in 2m2s
Update NEWS.
2026-03-13 22:17:24 +01:00
.forgejo/workflows maint: Add Forgejo workflows. 2025-11-27 08:42:41 +01:00
build-aux Install Git in the CI environment. 2020-02-06 21:04:50 -05:00
doc Add arithmetic expansion. 2021-05-26 13:16:50 -04:00
gash shell: Handle custom ports in 'install-current-ports!'. 2026-01-12 22:30:56 +01:00
language/sh Add a language specification. 2020-08-21 15:49:24 -04:00
scripts Open low-numbered file descriptors for use by the shell. 2025-05-05 17:08:04 +02:00
tests tests: Fix tests with guile 3.0.11. 2026-01-15 17:38:16 +01:00
tools Add missing copyright notice in coverage script. 2019-05-22 01:03:43 -04:00
.dir-locals.el Add support for Guile 2.0.9. 2019-05-20 18:07:47 -04:00
.gitignore Generate the ChangeLog reproducibly. 2019-12-09 13:57:15 -05:00
AUTHORS Update AUTHORS file. 2019-05-20 01:18:54 -04:00
bootstrap Initial commit 2018-01-31 14:52:05 -05:00
ChangeLog Reference Codeberg rather than Savannah. 2026-02-15 22:14:05 +01:00
configure.ac Reference Codeberg rather than Savannah. 2026-02-15 22:14:05 +01:00
COPYING Initial commit 2018-01-31 14:52:05 -05:00
COPYING.CC0 Clarify the license of COPYING.CC0. 2019-05-28 14:55:22 -04:00
guix.scm guix: Remove input labels. 2026-02-15 22:14:05 +01:00
Makefile.am build: Build ‘doc/version.texi’ even if Git info is missing. 2026-02-15 22:14:05 +01:00
NEWS Update NEWS. 2026-03-13 22:17:24 +01:00
README Markdownify README. 2025-12-21 18:45:30 +01:00
README.md Reference Codeberg rather than Savannah. 2026-02-15 22:14:05 +01:00
THANKS Add a THANKS file. 2019-06-01 11:09:29 -04:00

Gash --- Guile As SHell

Gash is a POSIX-compatible shell written in Guile Scheme. It provides both the shell interface, as well as a Guile library for parsing shell scripts. Gash is designed to bootstrap Bash as part of the Guix bootstrap process. We are planning to develop Gash into a general-purpose shell and tool for building interfaces between Scheme and the shell.

It is still early days for Gash. At the moment, Gash is extremely limited and extremely slow, so we cannot recommend using it as your shell. It does its bootstrapping job, and the parser works well for POSIX-compatible scripts, but that's about it.

Installing

This package uses GNU Autotools for building and installing. You may build it like this:

./bootstrap
./configure
make
make check
sudo make install

If you have GNU Guix, you can skip all that and install the package by running:

 guix package -f guix.scm

Gash is designed to work with Guile versions as early as 2.0.9.

Normally, you should build Gash using 'configure' and 'make'. However, it can be built with nothing but Guile. There is an example of this in the file 'tests/bootstrap/bash-without-bash.scm'.

Testing

Gash includes a number of unit and integration tests that can be run using 'make check'. If you are using Guile 2.0.9, you will have to make SRFI 64 available to run the unit tests. To do this, you can copy 'module/srfi/srfi-64.scm' and the 'module/srfi/srfi-64' directory from a newer version of Guile into a directory named 'srfi' in the Gash source code directory.

If you have GNU Guix, you can also run the following extra tests.

The bootstrap test can be run using 'make check-bootstrap'. It builds Gash using nothing but Guix's bootstrap Guile, then uses Gash to build Bash using Guix's bootstrap toolchain. This test is designed to make sure that Gash is suitable for bootstrapping.

The specification tests can be run using 'make check-spec'. These tests get copied and adapted from Oil https://www.oilshell.org/, and then run against Gash.

Contributing

You can report bugs and propose changes on Codeberg:

https://codeberg.org/guix/gash

A mailing list is also available for discussions:

https://lists.gnu.org/mailman/listinfo/gash-devel

Copying Gash

Gash is free software released under the GNU GPLv3 (or later). See 'COPYING' for the full license. Enjoy!

Copying this file

This file was written by Timothy Sample [email protected].

To the extent possible under law, the author(s) have waived all copyright and related or neighboring rights to this file.

You should have received a copy of the CC0 legalcode along with this work. If not, see http://creativecommons.org/publicdomain/zero/1.0/.