| Martin Neitzel 2005-12-01, 6:59 pm |
| Robert Bernecky <bernecky@acm.org> wrote:
> I'm constantly annoyed and frustrated by the amazing lack of consistency
> and generality in ALL of the Unix-like shells, and feel that a
> J-like language command shell would do wonders for the computing world.
Hi Bob,
the "rc" ("run commands") shell might suit you or other APLers.
Rc by Tom Duff is the standard (and only) shell in the Plan9 system.
(1) rc uses 'APL''s embedded quotes'.
(2) _All_ variables are lists of strings. E.g.:
srcs=(fi fo fum)
(3) The caret ^ is the string concatenation operator. It distributes
and pairs its operand lists as APL would do:
$srcs^(1 2 3) ==> fi1 fo2 fum3
diff foobar.^(old new)
cc /usr/wayne/$srcs.c
The latter works because carets are silently inserted in certain places.
The Plan9 rc has been ported to Unix by Byron Rakitzis (a long time ago).
While the above is rather APLish, the shellism which feels most
J-ish to me is the csh's "history" notation which I use A LOT. It
not only looks, too, like line noise, it also allows me e.g. to run
another command on "the same" arguments, but perhaps now a little
bit twisted. The notation is arcane to the ignorami, but both
quicker and more powerful than any cursor-based cmd-line recall+editing
could be.
Martin
|