Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site gitpyr.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxj!houxm!whuxlm!akgua!gatech!gitpyr!robert From: robert@gitpyr.UUCP (Robert Viduya) Newsgroups: net.unix-wizards Subject: Re: shell preprocessor for history & alias Message-ID: <457@gitpyr.UUCP> Date: Tue, 8-Jan-85 00:20:39 EST Article-I.D.: gitpyr.457 Posted: Tue Jan 8 00:20:39 1985 Date-Received: Fri, 11-Jan-85 08:23:00 EST References: <6986@brl-tgr.ARPA> <2254@umcp-cs.UUCP> Organization: Georgia Tech, Atlanta Lines: 35 >< > 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