ied.1 (2010 09)

i
ied(1) ied(1)
NAME
ied - input editor and command history for interactive programs
SYNOPSIS
ied [-dirt][-h
file][-k charmap ][-p prompt ][-s size] utility [arguments ]...
DESCRIPTION
The
ied utility command is intended to act as an interface between the user and an interactive program
such as bc, bs, or a 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 arguments as the argu-
ments 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; 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 cannot be edited with ied.
Options
Several options and command-line arguments control
ied’s operation:
-d Debug mode. Print information about the operation of the program. It is best used
to determine if a program puts ied into transparent mode unexpectedly.
-h filename Keep the history in a file named filename . If a file of that name already exists and
is a history file, the latter part of it (the last size lines as specified by the
-s option)
is used as the initial value of the history. If the
-h option is not used, the environ-
ment variable IEDHISTFILE is used to supply the name. If neither is present, an
unnamed temporary file is used, and no initial value is provided.
-i Force interactive mode. Normally ied simply execs the command to which it is
asked to be a front end when the standard input is not a tty (this allows aliases to
be used for commands used in shells without interfering with their operation). This
option forces ied to remain as a front end, and all editing functions are in place.
This permits a utility that behaves differently in interactive and batch modes to be
driven from a pipe or file in interactive mode. This is particularly useful in testing
commands that make this distinction.
-k charmap charmap is a file of 256 or fewer lines. The line number in the file is the ordinal of
a character as seen as input by ied, and the character on the line is the character
generated as output (and also used as editing characters). This allows remapping of
(ordinary) keys such as for a Dvorak keyboard. Characters must start in column
one of each line, and be represented as 1-4 characters followed by a space or the
newline character for the next line. Characters after the space are ignored as com-
ments. Single-character entries represent themselves. Two-character entries where
the first character is a circumflex (ˆ) converts the second character to the
corresponding control character. Two-character sequences where the first character
is backslash (\) use the C language conventions:
\n newline \s space
\\ escape \0 null
\r return \f form feed
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)