shell preprocessor for history & alias

Robert Viduya robert at gitpyr.UUCP
Tue Jan 8 15:20:39 AEST 1985


><
> Hmmm....  a "history preprocessor"...
> 
> Well, to get around the pipes problem, you could always use ptys (does
> System V *have* ptys?).  But I wonder what exactly "history" means in
> a program like VI or Emacs.  If you take the C shell history mechanism
> (please! :-) ) as your base idea, then you have "lines" of stuff with
> a "redo this line with the following changes" command, which doesn't
> seem to be too useful with screen editors.

The trick is to generalize it.  Define "history" as a list of previously
typed strings, which, for simplicity's sake, we'll call "events".  Input
events are defined and seperated by output _t_o the terminal.  This means
that, from the shell, an event would be a command line, because, after a command
is typed, output from the command or the appearance of a prompt would
seperate it from the next command line.  In a screen editor, an event would
be anything that changes the appearance of the screen, because changing the
screen would mean that something was sent to the terminal.

Obviously, this is not as simple as it sounds.  Character echoing should not
be considered as output to the terminal and, hence, is not an event seperator.
Since most screen editors handle their own echoing, this is more of a problem
than it seems.  Also, a more transparent method of calling up previous
events is necessary.  Perhaps YA terminal control character (user-defineable
via stty, of course).

				robert
-- 
Robert Viduya
Office of Computing Services
Georgia Institute of Technology, Atlanta GA 30332
Phone:  (404) 894-4669

...!{akgua,allegra,amd,hplabs,ihnp4,masscomp,ut-ngp}!gatech!gitpyr!robert
...!{rlgvax,sb1,uf-cgrl,unmvax,ut-sally}!gatech!gitpyr!robert



More information about the Comp.unix.wizards mailing list