ipipe-shell-command - Incremental pipe (non-suspending system call)
ipipe-kill - Kill a incremental pipe
ipipe-write - Write a string to an incremental pipe
n ipipe-shell-command "command" ["buffer-name"] (esc backslash)
n ipipe-write "string"
ipipe-kill
UNIX - irix, hpux, sunos55, freebsd, linux.
Windows NT - win32.
ipipe-shell-command executes the given system command command, opening up a *icommand* buffer into which the results of the command execution are displayed. Unlike the pipe-shell-command(2), the user may continue editing during command execution. The command may be terminated by deleting the buffer or issuing a ipipe-kill command.
The argument n can be used to change the default behavior of pipe-shell-command described above, n is a bit based flag where:-
0x01
0x02
0x04
%COMSPEC% /c command
Where %COMSPEC% is typically command.com. If this bit is set, the "command" is launched directly.
0x08
0x10
Many other macro commands (see compile(3), grep(3)etc.) use this command.
ipipe-write writes a string string to an open ipipe, n times.
ipipe-kill terminates an open ipipe, typically bound to the C-c C-c key sequence.
On UNIX platforms the TERM environment variable of the new process can be set by setting the user variable %ipipe-term to the required value, e.g.:
set-variable %ipipe-term "TERM=vt100-nam"
Ipipe shells support a large sub-set of vt100 terminal commands, notable exceptions are color and font support and the support of auto-margins. Using the terminal type "vt100-nam" disables the use of auto-margins, providing better support.
On platforms which do not support ipipe-shell-command, such as MS-DOS, executing ipipe-shell-command automatically invokes pipe-shell-command, hence macros may safely use ipipes without explicitly checking the platform type. ipipe-shell-command does not run reliably on Windows 3.11 and Windows 95; Windows NT does support ipipes.
While the pipe command is running, mode pipe(2m) is enabled. Modes lock(2m) and wrap(2m) effect the output behavior of an ipipe-shell-command.
The following example is the grep(3) command macro which utilizes the ipipe-shell-command, diverting the output to a buffer called *grep*.
define-macro grep !if &seq %grep-com "ERROR" set-variable %grep-com "grep " !endif !force set-variable #l0 @1 !if ¬ $status set-variable #l0 @ml00 %grep-com !endif !if @? 1 pipe-shell-command &cat %grep-com #l0 "*grep*" @mna !else 1 ipipe-shell-command &cat %grep-com #l0 "*grep*" @mna !endif !emacro
Note that if an argument is passed to grep then it uses pipe-shell-command instead. This is useful if another command is using grep which must finish before the calling command can continue, see replace-all-string(3) for an example.
On MicroSoft Windows platforms, ipipe-shell-command spawns the shell (e.g. command.com) with the appropriate command line to make it execute the given command. If the command to be run detaches from the shell and creates its own window, for example me.exe, ipipe-kill will only kill the shell, it will not kill the actual process, i.e. the me.exe.
On MicroSoft Windows platforms ipipe-shell-command does not work on Novell's Intranet Client v2.2 networked drives, version 2.5 does appear to work.
$buffer-ipipe(5), compile(3), grep(3), pipe-shell-command(2), replace-all-string(3), shell-command(2), pipe(2m), lock(2m), wrap(2m).
(c) Copyright JASSPA 1999
Last Modified: 1999/03/09
Generated On: 1999/12/01