Questions about rewriting the History function.

Ti Kan ti at altos86.Altos.COM
Wed Oct 24 09:34:23 AEST 1990


In <1990Oct19.165721.7584 at polyof.poly.edu>, mhoffman at george.poly.edu writes:
> 
> I am working on a senior project to rewrite the history function for
> UNIX. My goal is to have the new history functon work like it does in
> MS_DOS.  i.e. I want to be able to call up past commands and edit them
> by using the control <hjkl> characters. Additionally, I would like to
> write this as a stand alone program so that I do not have to rewrite
> the shell.

Perhaps it is useful to you to write such a thing for your senior
project, but it seems like such a waste of effort when you can
just use ksh (Korn Shell) that already has command history editing
capability.

Anyway, this will be difficult without incorporating the functionality
into the shell.  You can't really intercept keyboard input with a user
program before the shell gets it, unless you have a really weird
tty driver.  Also, how do you distinguish shell commands from
keystrokes typed during the run of an application?

-Ti
-- 
Ti Kan | vorsprung durch technik!                                       \\\
Internet: ti at altos.com                                                   \\\
UUCP: ...!{sun|sco|pyramid|amdahl|uunet}!altos!ti                     /// \\\
The opinions herein are not necessarily those of Altos.              ////////\



More information about the Comp.unix.programmer mailing list