Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vsh(1) — UNIX 2.8BSD

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VSH(1)  —  UNIX Programmer’s Manual

NAME

Vsh − visual shell

SYNOPSIS

Vsh

DESCRIPTION

Vsh is a highly interactive, visually oriented shell which eases many programming activities.  Most commands involve only a single keystroke.  These commands cause directories to be displayed, editors to be entered, and compilers to be invoked. 

On entry to Vsh, the current directory is plotted on the screen.  Each member of the directory is labeled with a letter.  To select a member, one presses its corresponding letter.  What happens after selection depends on the nature of the member.  If the member is a directory, Vsh changes to that directory.  Text files are edited.  Full details are given later in this manual. 

Vsh displays up to twenty files at a time.  Directories which are larger are broken into twenty-file pages.  There can be ten pages holding a total of two-hundred members.  To select a page, one presses a digit 0-9.  Pages are numbered one through ten with 0 selecting page ten. 

A well integrated feature of Vsh is its connection between compilers and editors.  To start a compile, one presses M.  Vsh then calls on Make(I).  The output of this compile step is saved, and one can later review for compile-time errors.  Vsh numbers each error.  One can select an error by typing in its number.  After selection, Vsh calls an editor, sending one to the proper file at the offending line.  One can jump between the editor and Vsh until one is ready for another compile. 

Because Vsh is unconventional, the best way to understand how it works is by using it.  Because Vsh is menu driven, it is hard to get lost.  Beginners should find Vsh easier to learn then the conventional shell. 

ENVIRONMENT PARAMETERS

Vsh takes the following parameters from the global environment:

HOME The home directory.  This parameter is automaticly set by Unix when one logs in. 

SHELL The users login shell.  Unix also sets this parameter.  When it is necessary to escape to a shell, this parameter selects the program to use. 

TERM The terminal type.  The terminal must be cursor addressable. 

The user must set the TERM parameter himself.  As an example, to indicate your terminal is an adm3a, from Csh(I) type:

     % setenv TERM adm3a

From Sh(I) type:

     $ TERM=adm3a;  export TERM

See Termcap(UCB) for more information about the TERM parameter. 

FILE SELECTION

As indicated before, one selects a file by pressing its corresponding letter.  What happens after selection depends on the nature of the file. 

File type Action

Directory Change to new directory. 

Archive Print archive directory.  This works for both Ar(I) and Cpio(I) format archives. 

Object program Print name list (external symbols). 

Core Call debugger. 

Text Call editor. 

Other Selection fails. 

DIRECTORY OPERATIONS

This is a list of the directory commands.  Before doing anything else, the user should become familiar with commands which allow him to select files and display directories.  In directories larger then twenty files, the user should be able to display each page. 

Command Action

^D Leave Vsh. 

a-t Select corresponding file. 

1-9 Select page 1-9. 

0 Select page 10. 

+ Select next page. 

; Same as +. 

− Select previous page. 

^ (Home) Change to home directory. 

/ Change to root directory. 

?  Display help file. 

!  Escape to shell. 

% Same as !. 

$ Escape to Bourne shell. 

-Line Feed- Change to previous (parent) directory. 

These are convenience commands. 

D Display date. 

I DIsplay file.  Vsh prompts for a file and displays it as ascii text.  This is faster than a selection which calls the editor. 

P Process status.  Call /bin/ps. 

W Who.  Display who is logged in. 

Y Yank.  Display free ports. 

These are advanced commands. 

F Select file by name.  Vsh prompts for a file name.  Vsh then selects the specified file. 

C Create a new file.  Vsh prompts for a file name and file type.  One may create text files and directories.  One may also copy and link from existing files. 

L Long format file listing.  Next to each file, Vsh displays protection information in the same manner as Ls(I). 

O Option listing.  The contents of command and parameter tables are displayed.  Vsh then prompts for commands which modify parameters and which create, modify, and delete commands. 

REMOVE MODE

Press R to enter Remove mode.  In Remove mode, selecting a file causes it to be marked for removal with two slashes, "//." Files selected a second time are unmarked.  Pressing R a second time causes all marked files to be removed.  The following commands are available in Remove mode:

Command Action
 

-Return- Exit Remove mode with out removing marked files. 

^D Same as -Return-

a-t Select corresponding file for removal. 

* Select all files on current page for removal. 

0−9, +, − Select and display another page.  These commands are described earlier in the manual in the section on directory operations. 

?  Display help file. 

R Remove marked files and exit Remove mode.  If Vsh cannot remove a file, Vsh displays the reason and waits for a response.  Press -Return- to continue removing marked files.  Press ^D to immediately exit from Remove mode. 

MAKE, GREP, AND SHOWFILE

Vsh interfaces to Make(I) and Grep(I).  Vsh saves output from these programs and allows one to examine the results in Showfile mode.  From the directory page, the following commands control Make, Grep, and Showfile. 

G Grep(I).  Vsh prompts for a pattern and file names, and then run Grep with these parameters.  The results are saved in the file .grepout and displayed in Showfile mode. 

S Show previous Grep.  The output of the last Grep is displayed in Showfile mode. 

M Make(I).  Vsh runs Make.  Execution is controlled by the makefile in the current directory.  Output is both displayed on the screen and saved in the file .makerror.  When Make terminates, Vsh displays .makerror in Showfile mode. 

N Make(I) running independently.  Make is run but Vsh does not wait for termination.  Output is saved in .makerror, but is not displayed on the screen.  When Make terminates, the bell on your terminal rings twice.  Use the E command to review the output in .makerror. 

E Review errors.  The results of the last Make are displayed in Showfile mode. 

SHOWFILE MODE

Showfile displays the results of a Make or Grep.  It is called by the E and S commands.  Showfile is called automatically in the course of an M or G command.  Showfile is essentially a special editor.  It has commands which allow one to display a file.  One can also command Showfile to examine a line of the file.  Showfile scans this line and attempt to extract a file name and line number.  Showfile then runs the editor, starting it at the specified line. 

These are the Showfile commands.  It is not necessary to press -Return- after these commands.  When a complete command is sensed, it is run immediately. 

Command Action

number p Print file starting at specified line. 

number e Examine line for a file name and line number.  If a file name is found, run the editor on this file. 

-Return- Display next twelve lines. 

number -Return- Same as number e

^D Leave Showfile. 

q Leave Showfile. 

?  Display help file. 

All commands from the directory page which might be useful are available in Showfile mode.  They include ^, /, !, %, and A through Z except L and R.  Particularly useful are M and G which allow new iterations of Make and Grep, %, the escape to the shell, and F, which allows one to edit files not found in the file being shown. 

CONTROL COMMANDS

The operation of Vsh is controlled by its parameter and command tables.  The contents of these tables can be displayed via the O command.  These tables can be modified with control commands.  When Vsh is invoked, it searches for the file .vshrc in your home directory.  Control commands are then read from this file, allowing one to create a personalized environment.  The O command also prompts for control commands, allowing for interactive modification of the tables. 

These control commands should be presented in the same lexical grammer as shell commands.  Spaces and tabs separate tokens.  Unquoted newlines terminate each statement.  A character may be quoted by preceding it with a \.  All characters inside single quotes (’ ’) are quoted except the single quote.  Inside double quotes (" "), \ quotes another double quote and \newline is ignored.  Grave accents (‘ ‘) are treated as any other character.  Macros (such as $HOME) are not available yet.  The lexical grammer is compatible with that of Sh(I).  The grammer is somewhat different from that of Csh (I). 

To change a parameter, use the format:

     PARAMETER−NAME   PARAMETER−VALUE

PARAMETER−NAME can be any off the following:
 

Parameter Usage

editor Preferred editor.  Default is /usr/ucb/vi. 

nm Namelist program.  Default is /bin/nm. 

db Debugging program.  Default is /bin/adb. 

make Make program.  Default is /bin/make. 

grep Grep program.  Default is /bin/grep. 

ar Archiving program.  Default is /bin/ar. 

To define a command, use the format:

     CHARACTER   KEYWORD   [PARAMETERS ...]

CHARACTER is the character which calls the new command.  Valid characters are ! " # $ % & ’ ( ) : * = ^ ~ [ ] { } < > , . / ?  and A−Z. 

These are the valid keywords:

Keyword Purpose

date Display date. 

showerror Show errors from previous Make. 

showgrep Show output from previous Grep. 

file Select a file.  If parameter is present, the parameter is selected.  Otherwise, Vsh will prompt for a file name. 

home Change to home directory. 

grep Run Grep.  Vsh will prompt for parameters. 

wmake Run Make.  Wait for termination. 

fmake Run Make.  Do not wait for termination. 

remove Enter Remove mode. 

longlist Print long format listing of files on the current page. 

display Display the contents of a file.  If no parameter is present, Vsh will prompt for a file name. 

options Display Vsh options (parameter and command tables).  Accept commands which modify parameters and which create, modify, and delete commands. 

exec Execute a program directly with the exec system call.  The first parameter must be the program name.  Directories are not successively searched as in the shell.  Full path names are necessary.  Any other parameters become parameters to the program.  If it is necessary to search several directories for programs, to redirect files, to expand macros, or to expand file regular expressions, use the shell keyword instead. 

shell If no parameter is present, an interactive shell is spawned.  If one parameter is present, it is passed to the shell and run as a command.  Do not specify more than one parameter.  Instead, enclose the entire shell command in quotes to provide Vsh with only one parameter. 

create Vsh prompts for a new file name.  The file is created. 

null Delete command.  The command will no longer be active. 

FILES

$HOME/.vshrc Initialization file. 

/etc/termcap Terminal capability database necessary for addressing cursor. 

.makerror File used to save the output of make.  This file is always created in the current directory. 

.grepout File used to save the output of grep.  Vsh tries to first create this file in the working directory.  If unsuccessful, the home directory is tried. 

$SHELL Your shell. 

/bin/pwd Program which determines the path name of the working directory. 

/dev/null Null file. 

7th Edition  —  6/11/79

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026