Commit Graph

185 Commits

Author SHA1 Message Date
Kelvin Sherlock 91590e92aa add missing (mostly macroman) operators 2022-11-25 16:02:27 -05:00
Kelvin Sherlock 6199944350 script parameters, move shift to the environment 2022-11-23 21:22:00 -05:00
Kelvin Sherlock f799eb6d81 allow break within loop ... end 2022-11-23 18:26:30 -05:00
Kelvin Sherlock 298c601300 include trailing text with the ) token so redirection works correctly 2022-11-23 18:18:32 -05:00
Kelvin Sherlock ce1a36eba5 add regular expression support for evaluate, if, etc.
eg:

evaluate abc =~ /(abc)®4/ # sets the '@4' environment variable.
evaluate abc !~ /[aA]bc/

MPW regular expressions are converted to c++11 std::regex regular expressions and evaluated.
Sadly, the // regular expression syntax interferes with unix-paths (if the / count is odd).  quoting or ∂-escaping the /s is therefore necessary.

file globbing is not yet implemented.
2022-11-22 17:22:49 -05:00
Kelvin Sherlock a90ca3c849 use classic macos file type to identify scripts. 2022-11-13 22:47:23 -05:00
Kelvin Sherlock fdf33c69b7 token support for regular expression strings /.../ and \...\. Also tokenizer support for =~ and !~ operators. 2022-11-02 21:42:25 -04:00
Kelvin Sherlock 6f2b59c4d6 script support. scripts run with an independent copy of the environment and aliases. local variables are not imported.
Currently, it for a ".text" extension to check if it's a script; this is a placeholder.
2022-11-02 21:42:25 -04:00
ksherlock fd94247aec
Merge pull request #6 from uliwitness/feature/docs-fixes
Add build instructions to Readme.
2022-10-16 12:12:08 -04:00
Uli Kusterer 8e54c6519c Add build instructions to Readme. 2022-10-16 14:39:56 +02:00
ksherlock 0c1419ec98
Update cmake-macos.yml 2022-09-25 13:19:26 -04:00
Kelvin Sherlock 225c3b8ebd open(O_CREATE) needs 3rd parameter. 2020-12-01 23:31:28 -05:00
ksherlock da24b85f68
Create cmake-ubuntu.yml 2020-12-01 23:21:37 -05:00
ksherlock f25a30edc7
Update cmake.yml 2020-12-01 23:08:34 -05:00
ksherlock e8c0080f77
Create cmake.yml 2020-12-01 23:05:43 -05:00
Kelvin Sherlock b8cada73e8 Merge branch 'master' of github.com:ksherlock/mpw-shell 2020-12-01 23:01:48 -05:00
Kelvin Sherlock be1c6c14fa std::move warning. 2020-12-01 23:01:00 -05:00
Kelvin Sherlock a15d2bf257 include generated lemon++ parser code so lemon++ isn't needed. 2020-12-01 23:00:41 -05:00
ksherlock 87b2cc0902
Update .travis.yml 2017-11-26 14:40:30 -05:00
Kelvin Sherlock 5d95f10dd8 remove trailing newline from sub-shell strings. 2017-11-26 14:02:59 -05:00
ksherlock 9d4340b3ac Merge pull request #4 from MaddTheSane/vsprintfFix
Fix messed up varargs call in environment
2017-05-01 18:06:04 -04:00
C.W. Betts 45df4524ea Fix messed up varargs calls. 2017-05-01 15:44:42 -06:00
Kelvin Sherlock 474b10ccaa look for ~/mpw, /usr/share/mpw, /usr/local/mpw 2016-10-08 09:55:31 -04:00
Kelvin Sherlock ed96470e18 builtin_help 2016-10-08 09:54:06 -04:00
Kelvin Sherlock 7b99997f28 Bump Version: 0.4 2016-09-24 12:51:24 -04:00
Kelvin Sherlock 42f9552352 nl @ end. 2016-09-24 12:49:10 -04:00
Kelvin Sherlock fa804e91f0 clean up cmakefile a little bit more. 2016-08-31 14:43:29 -04:00
Kelvin Sherlock 0ec15bcd63 lunix headers. 2016-08-30 20:59:44 -04:00
Kelvin Sherlock 06e2e1f309 improved option parsing for mpw-make. 2016-08-30 20:57:37 -04:00
Kelvin Sherlock 32c72cb89a update readme. 2016-08-30 20:56:54 -04:00
Kelvin Sherlock f125b533f7 Squashed commit of the following:
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.
2016-08-30 12:25:43 -04:00
Kelvin Sherlock f6c5478063 gcc/case sensitive fixes. 2016-08-17 13:14:38 -04:00
Kelvin Sherlock efd51bcb48 load UserStartup file. 2016-08-17 13:14:16 -04:00
Kelvin Sherlock 33dd3228f8 update the parser/lexer to make it more reusable. For example, subshells are now handled. 2016-08-16 16:47:20 -04:00
Kelvin Sherlock 548880a517 support -ledit or -lreadline 2016-08-12 14:50:18 -04:00
Kelvin Sherlock 1da6c3e9da fix + / - confusion. 2016-08-11 16:09:39 -04:00
Kelvin Sherlock bdba86249e prevent pipe command from running commands multiple times. 2016-08-11 12:30:01 -04:00
Kelvin Sherlock 87f5398649 mpw-make -- find the Make program. 2016-08-10 20:08:28 -04:00
Kelvin Sherlock 811c8b976a ... and use the config.h 2016-08-09 15:29:28 -04:00
Kelvin Sherlock 0422976719 generate config.h via CMake. 2016-08-09 15:29:10 -04:00
Kelvin Sherlock 2893f7fe79 PATH_MAX + 1 2016-08-09 14:47:11 -04:00
Kelvin Sherlock 34a4f431c0 noexcept mapped_file constructors. 2016-08-09 14:40:27 -04:00
Kelvin Sherlock f3db9b7cc0 shut up warning 2016-08-09 14:40:00 -04:00
Kelvin Sherlock a4e724a1a6 Bump Version: 0.3 2016-08-07 15:38:04 -04:00
Kelvin Sherlock fbcbfffcb5 mapped file -- if length is 0, return an unopened mapped file. Posix would EINVAL on a length of 0. 2016-08-07 15:37:02 -04:00
Kelvin Sherlock 50ac7355bd solaris / PATH_MAX 2016-08-07 15:35:54 -04:00
Kelvin Sherlock 827f49c48b solaris... 2016-08-07 14:43:18 -04:00
Kelvin Sherlock e2affa1bdd be more helpful if mpw / Startup file does not exist. 2016-08-06 17:55:26 -04:00
Kelvin Sherlock 76980a6e06 headers 2016-08-05 22:38:06 -04:00
Kelvin Sherlock ba0fe6268f headers 2016-08-05 22:35:52 -04:00