A shell for those that prefer Macintosh Programmer's Workshop.
mpw
Go to file
2016-07-23 15:29:53 -04:00
cxx
etc
.gitignore
.travis.yml
builtins.cpp
builtins.h
CMakeLists.txt convert utf8 input to macroman. 2016-07-21 15:14:27 -04:00
command.cpp ERROR terminal for parser. 2016-07-23 11:40:40 -04:00
command.h ERROR terminal for parser. 2016-07-23 11:40:40 -04:00
environment.cpp
environment.h
error.h
fdset.h
lemon_base.h
lempar.cxx
macroman.cpp macroman / utf 8 conversions. 2016-07-23 15:21:13 -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
mpw-shell-expand.rl
mpw-shell-parser.cpp
mpw-shell-quote.rl clean up must_quote a little bit, 2016-07-23 12:58:01 -04:00
mpw-shell-token.rl shell tokenizer -- support extended characters. 2016-07-23 15:20:56 -04:00
mpw-shell.cpp mpw-make - exit on error if {exit} 2016-07-23 15:29:53 -04:00
mpw-shell.h
mpw-shell.text
pathnames.rl
phase1.cpp
phase1.h convert utf8 input to macroman. 2016-07-21 15:14:27 -04:00
phase1.rl
phase2-parser.lemon ERROR terminal for parser. 2016-07-23 11:40:40 -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 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
README.md
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

Not supported

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

Builtin Commands

  • AboutBox
  • Directory
  • Echo
  • Exists
  • Export
  • Parameters
  • Quote
  • Set
  • 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.