ishell - Open a interactive shell window
$ME_ISHELL - Windows ishell command comspec
Windows '95/'98/NT/2K/XP - win32
Unix - All variants.
$ME_ISHELL = <comspec>
ishell creates an interactive shell window within the a MicroEmacs buffer window, providing access to the native operating systems command shell. Within the window commands may be entered and executed, the results are shown in the window.
On running ishell a new buffer is created called *shell* which contains the shell. Executing the command again creates a new shell window called *shell1*, and so on. If a *shell* window is killed off then the available window is used next time the command is run.
Additional controls are available within the shell window to control the editors interaction with the window. The operating mode is shown as a digit on the buffer mode line (2/3/4) which is defined in the following sections. The operational mode is changed with the F3 function key.
Mode 2 - Browse Mode
Mode 3 - Semi-immersion
Mode 4 - Full Immersion
To exit the shell then end the shell session using the normal exit command i.e. "exit" or "C-d" as normal and then close the buffer. A short cut "C-c C-k" is available to kill off the pipe. However, it is not recommended that this method is used as it effectively performs a hard kill of the buffer and attached process.
The UNIX environment uses the native pty support of the operating system. The shell that is opened is determined by the conventional $SHELL environment variable.
The shell window assumes that the user is running some sort of Emacs emulation on the command line (i.e. VISUAL=emacs for ksh(1), zsh(1), bash(1), tsch(1)) and passes Emacs controls for command line editing.
The shell window understands re-size operations and provides a limited decoding of the termio characters for a VT100 screen. From within the shell window it is possible to run the likes of top(1) correctly. It is even possible to run another MicroEmacs terminal session !!
The Windows environment provides a very poor command shell facility, this is more of a fundamental problem with the operating system than anything else. Unfortunately NT/2K/XP are no better than Windows '95/'98, stemming from the fact that Microsoft Windows is actually a huge Window Manager (hindered by legacy issues of MS-DOS).
For those familiar with the UNIX command shell then it is strongly recommended that the cygwin(3) BASH shell is used as an alternative. This is a far more responsive shell window and provides the familiar Emacs editing of the command line.
The command shell under Microsoft Windows is slow and very unresponsive, this would appear to be a problem with the command.com as the same problems are not apparent with the cygwin environment. However, the shell window is good for kicking off command line utilities (such as make) or any command line processes that generates output on stdout as all of the output is captured in the buffer window which can be scrolled backwards for post analysis. For this very reason it is more preferable to a standard MS-DOS box.
It is not possible to run any utilities that use embedded screen control characters as these are not interpreted by the editor.
The default shell that is executed is defined by the environment variable $COMSPEC. Where the user is using a different command shell (i.e. 4-DOS), then problems may arise if this is an old 16-bit executable. The shell that MicroEmacs executes may be overridden by setting the environment variable $ME_ISHELL. This is typically set in the me32.ini(8) file i.e.
The ishell command uses the ipipe-shell-command(2) to manage the pipe between the editor and the shell. The window is controlled by the macro file hkipipe.emf which controls the interaction with the shell.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2006/10/04
Generated On: 2006/10/07