Hi,
Does anybody know of a public domain version of ied on HP-UX?
I'm trying to find out how ied invokes a utility program and
positions itself as a frontend, and particularly how it handles
I/O. I'm reading the source of a public domain ksh to get some
ideas at the moment but it's difficult and time consuming.
What system calls are used and how are stdin/stdout handled... etc.?
Cheers,
Alwyn Teh
--------------->
ied(1) ied(1)
NAME
ied - input editor and command history for interactive programs
SYNOPSIS
ied [-dirt] [-h file] [-s size] [-p prompt]
[-k charmap] utility [arguments...]
DESCRIPTION
ied is a utility command that is intended to act as an interface
between the user and an interactive program such as bc, bs, or Bourne
shell, providing most of the line editing and history functionality
found in the Korn shell. ied interprets the utility name as the
command to be executed, and passes the arguments as the arguments to
the utility. Subsequent input to utility then has access to editing
and history functions very similar to those provided by ksh.
ied monitors the state of the pty it uses to run the command, and
whenever the application it is running changes the state from the
state of the tty when ied started, ied becomes "transparent". This
allows programs to do shell escapes to screen-smart programs. In
general, ied should not in any way interfere with any action taken by
any program for which it provides a front end. This includes Korn
shell itself: in this case ied would provide history for any
application that was run by ksh, and ksh would provide its own
independent history. In a useful extreme case, ied can be used as a
front end to the login shell (which might be ksh or csh). In this
case, all applications that use normal line editing gain line editing
and history, sharing a single history. The shell would continue to
have its own independent history if it provides such a mechanism.
When ied is in its transparent mode, no history is saved. In
particular the "ex" mode of vi does not use normal line editing
(rather, it simulates it) and ied cannot provide history in this case.
The Subject: and address line editing of mailx also is not editable
with ied.
...