2016-02-22 14:59:50 +00: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
|
2016-06-16 03:04:14 +00:00
|
|
|
* Loop ... End
|
2016-06-16 13:39:43 +00:00
|
|
|
* For name In [word...] ... End
|
2016-08-31 00:56:54 +00:00
|
|
|
* Break [If], Continue [If], Exit [If]
|
2016-02-22 14:59:50 +00:00
|
|
|
* ( ... )
|
|
|
|
* ||
|
|
|
|
* &&
|
2016-08-31 00:56:54 +00:00
|
|
|
* Redirection
|
|
|
|
* | "pipes" (via a temporary file. Presumably, that's what MPW did as well.)
|
|
|
|
* Subshells (`...`, ``...``)
|
|
|
|
|
2016-02-22 14:59:50 +00:00
|
|
|
|
2016-07-27 00:22:38 +00:00
|
|
|
Not (yet) supported
|
2016-02-22 14:59:50 +00:00
|
|
|
-------------
|
2016-07-27 00:22:38 +00:00
|
|
|
* aliases
|
|
|
|
* regular expressions
|
|
|
|
* text-editing commands (search forward/backward, et cetera)
|
2016-02-22 14:59:50 +00:00
|
|
|
|
|
|
|
Builtin Commands
|
|
|
|
----------------
|
2016-06-16 03:04:14 +00:00
|
|
|
* AboutBox
|
2016-07-27 00:22:38 +00:00
|
|
|
* Alias
|
|
|
|
* Catenate
|
2016-02-22 14:59:50 +00:00
|
|
|
* Directory
|
|
|
|
* Echo
|
2016-07-27 00:22:38 +00:00
|
|
|
* Evaluate
|
2016-08-31 00:56:54 +00:00
|
|
|
* Execute
|
2016-06-16 03:04:14 +00:00
|
|
|
* Exists
|
2016-02-22 14:59:50 +00:00
|
|
|
* Export
|
|
|
|
* Parameters
|
2016-08-31 00:56:54 +00:00
|
|
|
* Quit
|
2016-02-22 14:59:50 +00:00
|
|
|
* Quote
|
|
|
|
* Set
|
2016-07-27 00:22:38 +00:00
|
|
|
* Shift
|
|
|
|
* Unalias
|
2016-02-22 14:59:50 +00:00
|
|
|
* Unexport
|
|
|
|
* Unset
|
2016-06-16 03:04:14 +00:00
|
|
|
* Version
|
2016-02-22 14:59:50 +00:00
|
|
|
* Which
|
|
|
|
|
|
|
|
|
|
|
|
Setup
|
|
|
|
-----
|
|
|
|
1. Install MPW. The mpw binary should be somewhere in your `$PATH`.
|
2016-08-31 00:56:54 +00:00
|
|
|
It also checks `/usr/local/bin/mpw` and `$HOME/mpw/bin/mpw`. You can
|
|
|
|
use mpw-shell without it but only with builtin commands.
|
2016-02-22 14:59:50 +00:00
|
|
|
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.
|
2016-08-31 00:56:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
Command Line Flags
|
|
|
|
------------------
|
|
|
|
|
|
|
|
-D name=value Define environment variable
|
|
|
|
-v Be verbose (equivalent to -Decho=1)
|
|
|
|
-f Ignore the Startup script
|
|
|
|
-c string Execute string
|
|
|
|
-h Display help
|
2022-10-16 12:39:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
Build
|
|
|
|
-----
|
|
|
|
|
|
|
|
Standard CMake build sequence:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
make
|
|
|
|
```
|
|
|
|
|
|
|
|
After that, do the standard CMake install sequence in the same folder:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
cmake --install
|
|
|
|
```
|
|
|
|
|
|
|
|
to install `mpw-shell` and `mpw-make` in `/usr/bin/local`.
|