Questions about rewriting the History function.
Alex Martelli
staff at cadlab.sublink.ORG
Wed Oct 24 18:01:23 AEST 1990
wcs at cbnewsh.att.com (Bill Stewart 201-949-0705 erebus.att.com!wcs) writes:
...
>The main problem is that UNIX doesn't process or remember the command lines,
It doesn't, but then again, it MIGHT! There's a line-discipline called
CLED (Command Line Editing Discipline?), that was posted to some source
newsgroup within the last year or so, to do just that - history and
reasonable editing, NOT just erase and kill, for any process reading
/dev/tty in canonical mode. I have not been able to install it, but the
concept appears to be sound.
>You'll have to play around with shells you like, and you really need source.
I believe source for a sh lookalike was posted to some source group too,
maybe comp.sources.unix in or around volume 19; it may be easier to
work with than something more complex like ksh, yashell, etc.
Source for a VERY bare-bones subset of sh is in Rochkind's wonderful
book "Advanced Unix Programming" (if you haven't mastered the concepts
it displays, you're not a Unix programmer; if you have, you owe it to
yourself to read the book anyway - it's an enjoyable experience, on a
par with other classics in technical literature such as "The Unix
Programming Environment" and "The C Programming Language").
Given Rochkind's didactical purposes, this subset may be even better
than the full sh in volume 19, IFF the exercise is in a school setting;
for real-world purposes, of course, featuritis may be needed.
If you want to *redesign* a Unix shell, rather than starting from
available sources, look at the specs for "rc", Plan 9's shell, in the
proceedings of the UKUUG conference held in London last July; rc's
sources MIGHT even be available at some time in the future, but I'm told
not to hold my breath while AT&T's accountants figure out if this would
be A Good Thing - on the other hand, the specs and rationale ARE there
right now, and a good design it appears to be (I don't know what
"look-and-feel" intellectual-property laws and strictures might apply,
of course).
--
Alex Martelli - CAD.LAB s.p.a., v. Stalingrado 45, Bologna, Italia
Email: (work:) staff at cadlab.sublink.org, (home:) alex at am.sublink.org
Phone: (work:) ++39 (51) 371099, (home:) ++39 (51) 250434;
Fax: ++39 (51) 366964 (work only; any time of day or night).
More information about the Comp.unix.questions
mailing list