**GUSH - a Graphical User SHell - version 0.3** ***Introduction*** Gush integrates the functions of a shell, a "dumb" terminal and a pager like "more" or "less" to provide a more productive version of the traditional Unix command line. Some features: * Use mouse click or cursor keys to move the cursor anywhere. * New input can only be typed when cursor is in the input area, after all output. * Any text can be selected for copying by mouse or keyboard. * All output can be searched, and any new matches of the current search pattern are highlighted in output as it appears. * Different colours are used for stdin (blue), stdout (black), stderr (red). * Popup menus are used for history, file completion (easy to select from a long list without disturbing the terminal window contents). * Output from any backgrounded program will appear in its own screen area, not mixed up with other jobs. * Records per-directory command history, use command dirhist to view this, globhist for global history. * Right-click menu has options to change text wrap mode, font size, hide stdin/stdout/stderr text, undock a command into a separate window. Terminal emulation is primitive, just scrolling "glass teletype" style output, curses-style terminal output is not currently supported. This does not seem to be too much of a limitation - nowadays most programs with a complex user interface run with a GUI in their own window. Gush is aimed at aiding interaction with traditional style text-stream-oriented unix tools. When character-graphical (curses-style) programs are required they need to be run in their own xterm window. Bugs/features to colin.macleod@tesco.net please. License is BSD-type. ***Installation*** Distributed as one file from http://wiki.tcl.tk/_repo/gush/gush.tcl . It needs Tcl/Tk 8.4 or newer, Tclx and snit. If available it will use Tile widgets for updated appearance. There is code which is currently disabled (by "set catch_tty 0") which uses Expect (if available) to handle programs which write/read /dev/tty and pop-up a window for this I/O. Otherwise such output/input will go to the shell Gush was started from - not very helpful as it may not be visible. ***General*** The screen is divided into an output area which shows all output from commands run and cannot be edited, followed by an input area where commands and input to running commands can be typed and edited. Most keystrokes have their usual text editing and navigation functions, with exceptions described below. The whole output of commands run will be retained, and can be scrolled back. Program output to stderr is displayed in red, stdout is shown in black. ***Keystroke Functions in Input area*** +++ Enter Run what has been typed in the input area as a command. If a command is currently running, the input will be sent as input to that program. If the command typed so far contains { or " or ` or [[ without a corresponding closing } " ` or ]] it will not be run and input will continue on the next line. Shift-Enter Add a new line to the input area, without sending it to be processed. Control-w delete previous word. Control-u delete from current position to start of input area. Control-c if entering a command, delete whole input area; if a command is running, kill it (send SIGTERM). control-d if a command is running, close its input channel. control-z if a command is running, leave it running but prompt for a new command. Subsequent output from the first command will appear at the end of its own output area, above the new command prompt. You can resume interaction with the first command later by moving it to new window. Home go to start of input area. End go to end of input area. Esc jumps to just before input area. Up-arrow gives popup menu of command history for current session - use keyboard or mouse to select from menu or Esc to dismiss. Tab does filename completion, giving a popup menu if there are multiple matches. Note that you can use glob patterns in the partial filename. If directories are matched they get submenus - use right-click or right-arrow to enter, or left-click or Enter-key to select the directory itself. Insert insert the currently selected text. Control-f open a search dialogue at the top of the screen where you can enter text or a regular expression to search for. Note that all occurrences of the string will be highlighted, and this continues incrementally as new program output appears on the screen. The cursor will be moved to the next or previous matched text when the Next or Prev buttons are clicked. F1 open help window. +++ ***Keystroke Functions in Output area*** +++ Enter jump back to last position in input area. Insert jump back to last position in input area. Control-PageUp jump to the previous command line. Control-PageDown jump to the next command line. space page forward "b" page back "/" start search forward "?" start search backwards "n" repeat search forward "p" repeat search backwards +++ ***Mouse Functions*** +++ Left-click move cursor to point clicked. Middle-click copies selected text to current insertion point in the input area. Right-click give a popup menu of actions. +++ The right-click menu options are: +++ Kill Job will kill (send SIGTERM to) this command's processes. End Job Input will close the input channel to this command's processes. Undock Job Window will move this command's whole input and output to a separate window (whether the command is complete or still running). Hide Output hides all standard output text from commands run. Hide Error hides all standard error text from commands run. Hide Input hides all standard input text sent to commands run. Font Size gives submenu of text font sizes. Line Wrap gives submenu to switch text wrap mode - none/char/word. +++ ***Command Syntax*** Usage is generally similar to other shells (particularly csh, the Berkeley C-Shell) with some differences. Within the command line, $_ can be used to substitute the standard output of the last command. The output of previous command number n can be substituted by $out(n) or $err(n) for its standard error output. Entering $(command) or `command` will run command and substitute its output into the command line. Use "set name value" to set internal variables, whose value can be retrieved as $name. Use "setenv name value" to set environment variables. } A command can be run "in the background" by ending it with &, so you will immediately get a new command prompt, however any output from that command will be shown in its own screen area, not mixed with the output of subsequent commands.Commands: +++ exit exit from gush. history lists current session history. globhist