1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-03 09:21:19 +02:00
zsh/Doc/Zsh/mod_zpty.yo

43 lines
1.9 KiB
Plaintext
Raw Normal View History

2000-01-20 19:44:54 +01:00
COMMENT(!MOD!zsh/zpty
A builtin for starting a command in a pseudo-terminal.
!MOD!)
The tt(zsh/zpty) module offers one builtin:
startitem()
findex(zpty)
xitem(tt(zpty) [ tt(-e) ] [ tt(-b) ] var(name) var(command) [ var(args ...) ])
xitem(tt(zpty) tt(-d) [ var(names) ... ])
xitem(tt(zpty) tt(-w) [ tt(-n) ] var(name) var(strings ...))
xitem(tt(zpty) tt(-r) var(name) [ var(param) [ var(pattern) ] ])
item(tt(zpty) [ tt(-L) ])(
In the first form, the var(command) is started with the var(args) as
2000-05-21 20:27:36 +02:00
arguments. The command runs under a newly assigned pseudo-terminal; this
is useful for running commands non-interactively which expect an
interactive environment. The var(name) given is used to refer to this
command in later calls to tt(pty). With the tt(-e) option given, the
2000-01-20 19:44:54 +01:00
pseudo-terminal will be set up so that input characters are echoed and
with the tt(-b) option given, input and output from and to the
pseudo-terminal will be blocking.
The second form with the tt(-d) option is used to delete commands
2000-05-21 20:27:36 +02:00
previously started by supplying a list of their var(name)s. If no
var(names) are given, all commands are deleted. Deleting a command causes
the HUP signal to be sent to the corresponding process.
2000-01-20 19:44:54 +01:00
2000-05-21 20:27:36 +02:00
The tt(-w) option can be used to send the command var(name) the given
var(strings) as input (separated by spaces). If the tt(-n) option is
not given, a newline will be added at the end.
2000-01-20 19:44:54 +01:00
The tt(-r) option can be used to read the output of the command
2000-05-21 20:27:36 +02:00
var(name). Without a var(param) argument, the string read will be
printed to standard output. With a var(param) argument, the string
read will be put in the parameter named var(param). If the
2000-01-20 19:44:54 +01:00
var(pattern) is also given, output will be read until the whole string
read matches the var(pattern).
The last form without any arguments is used to list the commands
2000-05-21 20:27:36 +02:00
currently defined. If the tt(-L) option is given, this is done in the
2000-01-20 19:44:54 +01:00
form of calls to the tt(zpty) builtin.
)
enditem()