A shell for those that prefer Macintosh Programmer's Workshop.
mpw
Go to file
2016-08-05 10:34:05 -04:00
cxx
etc
.gitignore
.travis.yml
builtins.cpp
builtins.h
CMakeLists.txt use updated lemon++. 2016-08-05 10:25:17 -04:00
command.cpp fix up execution a little more 2016-07-28 13:58:13 -04:00
command.h
environment.cpp echo is const. 2016-07-28 13:42:29 -04:00
environment.h echo is const. 2016-07-28 13:42:29 -04:00
error.h mpw errors 2016-07-27 14:04:57 -04:00
fdset.h implement pipe. 2016-07-26 16:07:44 -04:00
macroman.cpp white space. 2016-07-26 16:07:51 -04:00
macroman.h
macroman.x
make-version.rb
mpw-shell-expand.rl fix shell expansion -- retain "s 2016-07-27 16:28:28 -04:00
mpw-shell-parser.cpp clean up errors a little bit. 2016-07-28 13:42:18 -04:00
mpw-shell-quote.rl
mpw-shell-token.rl tokenizer -- remove quotes as separate step, return clean command line. 2016-07-28 13:43:33 -04:00
mpw-shell.cpp clean up error reporting. 2016-07-28 14:03:52 -04:00
mpw-shell.h tokenizer -- remove quotes as separate step, return clean command line. 2016-07-28 13:43:33 -04:00
mpw-shell.text
pathnames.rl
phase1.cpp phase 1 -- escape nl in comment joins the line. 2016-07-28 15:26:37 -04:00
phase1.h
phase1.rl
phase2-parser.lemon lemon left-hand-side optimizations 2016-08-05 10:34:05 -04:00
phase2.h use updated lemon++. 2016-08-05 10:25:17 -04:00
phase2.rl simplify argv0 lookup a little bit. 2016-07-28 16:30:17 -04:00
README.md update readme a little more. 2016-07-26 20:22:38 -04:00
value.h
value.rl
version.h

MPW Shell

MPW Shell is a re-implementation of the Macintosh Programmer's Workshop shell. The primary reason is to support MPW Make (which generated shell script). It may also be useful for other things.

Supported features

  • If ... [Else If] ... [Else] ... End
  • Begin ... End
  • Loop ... End
  • For name In [word...] ... End
  • Break [If], Continue [If]
  • ( ... )
  • ||
  • &&
  • redirection
  • | "pipes" (via a temporary file. Presumably, that's what MPW did as well.)

Not (yet) supported

  • subshells (..., ...)
  • aliases
  • regular expressions
  • text-editing commands (search forward/backward, et cetera)

Builtin Commands

  • AboutBox
  • Alias
  • Catenate
  • Directory
  • Echo
  • Evaluate
  • Exists
  • Export
  • Parameters
  • Quote
  • Set
  • Shift
  • Unalias
  • Unexport
  • Unset
  • Version
  • Which

Setup

  1. Install MPW. The mpw binary should be somewhere in your $PATH. It also checks /usr/local/bin/mpw and $HOME/mpw/bin/mpw
  2. Copy the Startup script to $HOME/mpw/. This script is executed when mpw-shell (or mpw-make) starts up (imagine that) and should be used to set environment variables.