mirror of
https://github.com/ksherlock/mpw-shell.git
synced 2024-12-27 03:32:05 +00:00
A shell for those that prefer Macintosh Programmer's Workshop.
f125b533f7
commit f0944a89f27e44b1764988806e655f09764e80df Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Tue Aug 30 12:24:08 2016 -0400 exit throws execution of input error w/ possible 0 value. catch it. commit 9e7f9c1ae049aa26513413f4767268b47ee22e98 Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Tue Aug 30 12:23:21 2016 -0400 builtins - more consistent argument handling. commit be4c1c902f5a3a3f01e92ae52c7d6cc5d8731b65 Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Tue Aug 30 12:23:01 2016 -0400 . commit 68d0c29fec112c6e7bc3a672b41eb7eb758a8941 Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Tue Aug 30 12:22:51 2016 -0400 exit command. commit 25b0a7f7da9220b03026123bb5072c2da1d73fde Author: Kelvin Sherlock <ksherlock@gmail.com> Date: Tue Aug 30 12:21:16 2016 -0400 builtin quit command. |
||
---|---|---|
cxx | ||
etc | ||
.gitignore | ||
.travis.yml | ||
builtins.cpp | ||
builtins.h | ||
CMakeLists.txt | ||
command.cpp | ||
command.h | ||
config.h.in | ||
environment.cpp | ||
environment.h | ||
error.h | ||
fdset.h | ||
macroman.cpp | ||
macroman.h | ||
macroman.x | ||
make-version.rb | ||
mpw_parser.cpp | ||
mpw_parser.h | ||
mpw-shell-expand.rl | ||
mpw-shell-parser.cpp | ||
mpw-shell-quote.rl | ||
mpw-shell-token.rl | ||
mpw-shell.cpp | ||
mpw-shell.h | ||
mpw-shell.text | ||
pathnames.rl | ||
phase1.cpp | ||
phase1.h | ||
phase1.rl | ||
phase2.h | ||
phase2.rl | ||
phase3_parser.h | ||
phase3.lemon | ||
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
- | "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
- Install MPW. The mpw binary should be somewhere in your
$PATH
. It also checks/usr/local/bin/mpw
and$HOME/mpw/bin/mpw
- 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.