You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
4 months ago | |
---|---|---|
.github/workflows | 6 months ago | |
cxx | 2 years ago | |
etc | 7 years ago | |
.gitignore | 7 years ago | |
.travis.yml | 5 years ago | |
CMakeLists.txt | 4 months ago | |
README.md | 5 months ago | |
builtins.cpp | 4 months ago | |
builtins.h | 7 years ago | |
command.cpp | 4 months ago | |
command.h | 7 years ago | |
config.h.in | 7 years ago | |
environment.cpp | 4 months ago | |
environment.h | 4 months ago | |
error.h | 4 months ago | |
fdset.h | 7 years ago | |
lemon_base.h | 2 years ago | |
macroman.cpp | 7 years ago | |
macroman.h | 7 years ago | |
macroman.x | 7 years ago | |
make-version.rb | 7 years ago | |
mpw-regex.cpp | 4 months ago | |
mpw-regex.h | 4 months ago | |
mpw-shell-expand.rl | 4 months ago | |
mpw-shell-parser.cpp | 4 months ago | |
mpw-shell-quote.rl | 7 years ago | |
mpw-shell-token.rl | 4 months ago | |
mpw-shell.cpp | 7 years ago | |
mpw-shell.h | 4 months ago | |
mpw-shell.text | 7 years ago | |
mpw_parser.cpp | 7 years ago | |
mpw_parser.h | 7 years ago | |
pathnames.rl | 2 years ago | |
phase1.cpp | 4 months ago | |
phase1.h | 7 years ago | |
phase1.rl | 7 years ago | |
phase2.h | 7 years ago | |
phase2.rl | 4 months ago | |
phase3.cpp | 2 years ago | |
phase3.h | 2 years ago | |
phase3.lemon | 7 years ago | |
phase3.out | 2 years ago | |
phase3_parser.h | 7 years ago | |
value.h | 7 years ago | |
value.rl | 7 years ago | |
version.h | 7 years ago |
README.md
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], Exit [If]
- ( ... )
- ||
- &&
- Redirection
- | "pipes" (via a temporary file. Presumably, that's what MPW did as well.)
- Subshells (
...
,...
)
Not (yet) supported
- aliases
- regular expressions
- text-editing commands (search forward/backward, et cetera)
Builtin Commands
- AboutBox
- Alias
- Catenate
- Directory
- Echo
- Evaluate
- Execute
- Exists
- Export
- Parameters
- Quit
- 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
. You can use mpw-shell without it but only with builtin commands. - 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.
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
Build
Standard CMake build sequence:
mkdir build
cd build
cmake ..
make
After that, do the standard CMake install sequence in the same folder:
cmake --install
to install mpw-shell
and mpw-make
in /usr/bin/local
.