A shell for those that prefer Macintosh Programmer's Workshop.
mpw
Go to file
Kelvin Sherlock 47af010ba5 mpw errors
2016-07-27 14:04:57 -04:00
cxx filesystem::canonical 2016-02-11 20:50:38 -05:00
etc extra stuff 2016-02-22 09:59:50 -05:00
.gitignore initial version 2016-01-27 10:43:34 -05:00
.travis.yml travis - make no longer needs to be installed. 2016-07-19 12:47:38 -04:00
builtins.cpp builtin_which -- also check builtin commands. 2016-07-24 21:21:15 -04:00
builtins.h builtin catenate (builtin so cr/lf conversion blocked) 2016-07-23 23:50:28 -04:00
CMakeLists.txt convert utf8 input to macroman. 2016-07-21 15:14:27 -04:00
command.cpp implement pipe. 2016-07-26 16:07:44 -04:00
command.h parse | pipe lines. 2016-07-26 14:20:11 -04:00
environment.cpp builtin_alias / builtin_unalias. 2016-06-22 13:48:05 -04:00
environment.h user map for environment variables so they print in alphabetical order. 2016-06-22 13:48:26 -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
lemon_base.h update phase2 2016-01-30 12:44:42 -05:00
lempar.cxx continuation prompt. 2016-02-04 21:57:17 -05:00
macroman.cpp white space. 2016-07-26 16:07:51 -04:00
macroman.h macroman / utf 8 conversions. 2016-07-23 15:21:13 -04:00
macroman.x macroman / utf 8 conversions. 2016-07-23 15:21:13 -04:00
make-version.rb version bump 2016-06-16 21:55:39 -04:00
mpw-shell-expand.rl lots of updates! 2016-02-01 20:38:29 -05:00
mpw-shell-parser.cpp fix comment. 2016-07-23 16:04:13 -04:00
mpw-shell-quote.rl clean up must_quote a little bit, 2016-07-23 12:58:01 -04:00
mpw-shell-token.rl mpw errors 2016-07-27 14:04:57 -04:00
mpw-shell.cpp mpw-make - exit on error if {exit} 2016-07-23 15:29:53 -04:00
mpw-shell.h lots of updates! 2016-02-01 20:38:29 -05:00
mpw-shell.text initial version 2016-01-27 10:43:34 -05:00
pathnames.rl version bump 2016-06-16 21:55:39 -04:00
phase1.cpp rewrite phase1 in C -- slightly strange processing is ugly in ragel. 2016-07-21 11:46:39 -04:00
phase1.h convert utf8 input to macroman. 2016-07-21 15:14:27 -04:00
phase1.rl clean up whitespace coalesce a bit 2016-02-10 23:53:41 -05:00
phase2-parser.lemon parse | pipe lines. 2016-07-26 14:20:11 -04:00
phase2.h rewrite phase-2 lexical analysis. It splits on ; ( ) || && and I've deferred the invalid string checks until later. 2016-07-23 11:54:46 -04:00
phase2.rl parse | pipe lines. 2016-07-26 14:20:11 -04:00
README.md update readme a little more. 2016-07-26 20:22:38 -04:00
value.h initial version 2016-01-27 10:43:34 -05:00
value.rl initial version 2016-01-27 10:43:34 -05:00
version.h Bump Version: 0.2 2016-06-17 22:22:43 -04:00

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.