cygwin - Open a Cygwin BASH window
%cygwin-path - Cygwin root directory
%cygwin-hilight - Cygwin shell hilight enable flag
%cygwin-prompt - Cygwin shell prompt
Windows '95/'98/NT/2K/XP - win32 ONLY
cygwin
%cygwin-path "path"
%cygwin-hilight [0|1]
%cygwin-prompt "hilightString"
cygwin creates an interactive BASH shell window within a MicroEmacs buffer window, providing a UNIX command line facility within the Microsoft Windows environment. This is a preferable environment to the MS-DOS shell and is certainly far more comfortable for those familiar with UNIX.
Within the window BASH commands may be entered and executed, the results are shown in the window. Within the context of the BASH shell window then directory naming conforms to the cygwin standard conventions (as opposed to the Microsoft directory naming).
On running cygwin a new buffer is created called *cygwin* which contains the shell. Executing the command again creates a new shell window called *cygwin1*, and so on. If a cygwin 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
F5
To exit the shell then end the shell session using "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
%cygwin-path is a user defined variable that defines the file system location of the cygwin directory, this is typically c:/cygwin. If cygwin is located at a different location then the variable MUST be defined within the user start up script in order for the cygwin command to start the shell. With a default installation of cygwin then the settings are typically defined as:-
Current Release
set-variable %cygwin-path "c:/cygwin"
%cygwin-hilight is a boolean flag which controls how the cygwin command shell window is hilighted. This value MUST be defined within the user start up script prior to executing cygwin if hilighting is to be disabled; by default hilighting is enabled. A value of 0 disables shell hilighting i.e.
set-variable %cygwin-hilight 0
%cygwin-prompt is an optional variable that is used in conjunction with %cygwin-hilight, it defines the hilighting string identifying the prompt. This allows the prompt to be rendered with a different color. The default prompt is bash-x.yyr$ and may be hilighted using a definition:-
set-variable %cygwin-prompt "bash-2.01$"
The user typically overrides the prompt definition within the BASH startup file, a more appropriate definition of the prompt may be:-
set-variable %cygwin-prompt "^[a-z]*@[^>]*>"
The cygwin command uses the ipipe-shell-command(2) to manage the pipe between the editor and the bash shell. The window is controlled by the macro file hkcygwin.emf which controls the interaction with the shell.
The macro cygwin in hkcygwin.emf defines the parameter setup to connect to the cygwin bash shell, installed in the default location c:/cygwin. If your installation of cygwin is in a different location then correct the macro to match your install location, preferably correct by creating a mycygwin.emf file in your user directory simply containing a re-defined cygwin macro.
If you have exported some of the cygwin environment variables in your autoexec.bat then you will have to figure out for yourself what variables macro cygwin needs to export - the current configuration is for a vanilla install.
The bash shell is executed with options -i, for interactive shell and -m to enable job control.
As of the 2004 release then the Cygwin/Cygnus support has been revised in light of the changes in cygwin
This configuration has only been tested on a Windows 2000 installation, whether this works on Windows 95/98/NT is unknown while XP is very likely to work.
We have only been running "make" operations in the shell and do not know how the likes of "more", "man" or anything other terminal interaction works.
Tested Configurations
cygwin latest version as of February 2004.
Break Key
Completion
ipipe-shell-command(2),
ishell(3).
Cygwin home site www.cygwin.com
(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12