hush (a Bourne-style shell) for the GNO multitasking environment on the Apple IIgs
Go to file
Stephen Heumann f873a5cb9f README format fix. 2014-12-15 21:48:31 -06:00
coreutils Make test report EXEC files (shell scripts) as executable. 2014-12-04 13:41:21 -06:00
include Enable "fancy echo," including echo -n and -e options. 2014-12-10 18:56:14 -06:00
libbb Include copyright/license notices in all c files, including a BSD-style license for ones written from scratch by me. 2014-12-15 17:27:46 -06:00
notes Move all the source files to 15-character ProDOS-compatible file names. 2014-11-02 22:11:07 -06:00
shell Fix problem with the read builtin where it wouldn't finish until you typed an additional character beyond the return that was supposed to terminate it. 2014-12-14 22:06:27 -06:00
.gitignore Minimal changes to enable hush-only builds on OS X 2014-10-26 21:14:47 -05:00
.indent.pro First revision of the Busybox Style Guide and an accompanying .indent.pro 2000-07-24 22:36:06 +00:00
LICENSE LICENSE: update address of the FSF 2009-05-06 05:28:53 -04:00
Makefile Update the makefile for building on modern *nix systems. Rename to "Makefile" so we can build with just "make." 2014-12-15 16:47:12 -06:00
Makefile.mk GNO Makefile updates 2014-12-15 16:35:34 -06:00
README.md README format fix. 2014-12-15 21:48:31 -06:00
build.gs GNO Makefile updates 2014-12-15 16:35:34 -06:00
texttogs Set things up so hush can be build with debug code turned on. 2014-11-06 11:42:17 -06:00

README.md

The hush shell for GNO

This is a port of the hush shell to the GNO multitasking environment for the Apple IIgs. Hush is a Bourne/POSIX-style shell that was originally part of BusyBox. In general, it implements most of the features you would expect, although there are a few missing ones (such as tilde expansion and aliases).

Supported features include:

  • if/then/elif/else/fi conditionals
  • for/in/do/done loops
  • while loops
  • case/esac
  • functions
  • redirections (including specifying file descriptors)
  • here documents
  • arithmetic with $((...))
  • command substitution with backticks or $(...)
  • glob pattern expansion (including globbing across multiple directory levels)
  • command line editing with history and tab completion
  • job control
  • and much more...

Installation

To use hush, you need GNO 2.0.6. Just copy the "hush" binary to a suitable location. (You may want to install it as /bin/sh to support portable scripts that expect a Bourne-type shell in that location).

To build it, you also need ORCA/C 2.1.x and plenty of memory (8MB is enough). Run make or (if the source files don't have correct filetypes) ./build.gs. You should also be able to build it on modern *nix systems by running make, although this is meant mainly for testing purposes.

GNO-specific notes and known issues

  • $PATH is expected to be in the usual GNO format (searched backwards, with spaces as separators).

  • File descriptors 0, 1, and 2 appearing in shell operations like redirections are translated to 1, 2, and 3, respectively. This maintains compatibility with Unix shell scripts that expect these to be stdin, stdout, and stderr.

  • Glob expansion doesn't work with patterns containing : directory separators. Use / separators instead.

  • Hush currently crashes when used interactively in TMTerm or GSI (scripts should work, though).

License

Hush is licensed under the GNU General Public License version 2, contained in the file LICENSE. Some individual source files contain code licensed under other GPL-compatible permissive licenses. See the individual source files for full licensing details and copyright notices.

The compiled hush binary also contains code from the ORCA/C runtime libraries, to which the following notice applies:

This program contains material from the ORCA/C Run-Time Libraries, copyright 1987-1996 by Byte Works, Inc. Used with permission.