ied(1)

ied(1)

NAME

ied - input editor and command history for interactive programs

SYNOPSIS

ied [-dirt][-h®le ] [-ssize ] [-pprompt ] [-kcharmap ] 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 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 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.

-hfilename

Keep the history in a ®le named ®lename. If a ®le of that name already exists and is a

 

history ®le, the latter part of it (the last size lines as speci®ed by the -soption) is

 

used as the initial value of the history. If the -hoption is not used, the environment

 

variable IEDHISTFILE is used to supply the name. If neither are present an

 

unnamed temporary ®le 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 ®le in interactive mode. This is particularly useful in testing

 

commands that make this distinction.

-kcharmap

charmap is a ®le of 256 or fewer lines. The line number in the ®le is the ordinal of a

 

character as seen as input by ied, and the character on the line is the character gen-

 

erated as output (and also used as editing characters). This allows remapping of (ordi-

 

nary) 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 new-line

 

character for the next line. Characters after the space are ignored as comments.

 

Single-character entries represent themselves. Two-character entries where the ®rst

 

character is a circum¯ex (Ã) converts the second character to the corresponding con-

 

trol character. Two-character sequences where the ®rst character is backslash (\) use

 

the C language conventions:

\n

newline

\s

space

\\

escape

\0

null

\r

return

\f

form feed

i

HP-UX Release 11i: December 2000

− 1 −

Section 1353