COHERENT manpages
This page displays the COHERENT manpage for vsh [Interactive graphical shell].
List of available manpages
Index
vsh -- Command
Interactive graphical shell
vsh [-ddirectory] [-eirt]
vsh is the COHERENT system's visual shell. With it, users can use arrow
keys or simple keystrokes to perform tasks under the COHERENT, such as
change directories, edit files, and execute programs. Each user can
program a bank of up to nine function keys to perform complex tasks with a
single keystroke. With vsh, a naive user can access much of the power of
the COHERENT system without having to learn the details of sh or ksh.
Unlike X or other windowing systems, vsh works on a character-based
terminal and requires only a modest amount of memory. It does not require
a mouse.
Graphics Interface
vsh uses the curses library and terminfo descriptions. To use vsh, you
must have a terminfo description installed for the device upon which you
wish to run it, and you must set the environmental variable TERM to point
correctly to that description. For example, to run vsh from your console,
you should set TERM to ansipc; while to run it from a PC that is plugged
into a serial port, you should set TERM to vt100. You must have a terminfo
description for the device to which you set TERM, or vsh will behave
bizarrely. For more information on devices and how to set them, see the
Lexicon entries for TERM and terminfo. For more information on terminals in
general, see the entries for terminal and console.
To ensure that TERM set correctly, you may wish to embed the command
ttytype in the file /etc/profile. For more details, see the Lexicon entry
for ttytype.
If you have a non-standard terminal or have trouble displaying vsh, try
invoking it with the options -e or -t. All of vsh's command-line options
are described below.
Main Screen
When you invoke vsh, you see a screen that appears as follows:
-------------------------------------------------------------------------------|
| File Dir Options Install Command Refresh Exit Help |
|------------------------------------------------------------------------------|
|/v |>| |
|------------------------------------------------------------------------------|
| [..] 12:49 2-04-94 rwxr-xr-x ^ System: lepanto |
| [PostScript] 12:15 12-02-93 rwxrwxrwx # Line: ttyp1 |
| [backup] 9:39 10-05-93 rwxr-xr-x + Login: fred |
| [font] 12:41 10-19-93 rwxr-xr-x + UID: fred (10) |
| [fwb] 13:51 2-09-94 rwxr-xr-x + GID: user (5) |
| [gif] 9:23 2-05-94 rwxrwxrwx + Date: 2-9-94 |
| [lost+found] 15:00 11-15-93 rwxrwxrwx + Time: 22:08 |
| [sounds] 16:04 1-05-94 rwxr-xr-x + -------------------------|
| OLD.gtz 95868 9:30 1-29-94 rw-r--r-- + Files: 10 |
| mount.all 372 10:02 1-29-94 rwxr-xr-x + File size: 96240 |
| + Files tagged: 0 |
| + File size ta.: 0 |
| + File size ta.: 0 |
| + Dir. Stack: 0 |
| + Mail: None |
| + /usr/spool/mail/fred |
| + you can get messages |
| + |
| v |
|------------------------------------------------------------------------------|
1______ 2______ 3______ 4______ 5______ 6______ 7______ 8______ 9______
As you can see, the screen is divided the following six sections, or
windows:
-> The first window, the Command Window, is the narrow window that runs
across the top of the screen. This window lists the commands that vsh
can perform. You will enter this window frequently as you work with
vsh.
-> The second window, the Current Directory window, names the directory
that you are currently in.
-> The third window, the Destination Directory window, names the default
destination directory.
-> The fourth window, the File Window, extends down the left side of the
screen. It lists the contents of the current directory. You will also
work frequently in this window.
-> The fifth window, the System Window, is the upper window on the right
side of the screen. It gives information about the system, that is, who
is running vsh, the device she is running it on, and the current date
and time. Your cursor never enters this window.
-> The last window, the Status Window, gives information about the work you
have performed under vsh. Again, your cursor will never enter this
window.
Across the bottom of the screen are nine ``stubs,'' one each for function
keys one through nine. The stub's text indicates the command that vsh
executes when you press that key.
The following sections discuss each window in detail.
File Window
The file window lists all of the files and directories within the current
directory. This is the default window for vsh; the cursor ordinarily rests
in this window, and you will do most of your work in it.
The leftmost column in the File Window gives the name of each file and
directory. Directories are given at the top of the list; they are enclosed
within brackets `[ ]'. The other columns give, respectively the time the
file or directory was last updated; the date it was last updated; and its
permissions. For information on how to interpret the permissions string,
see the Lexicon entry for the command ls.
The top listing in the File Window is always [..], which represents the
current directory's parent directory.
The top listing in this list is highlighted by being shown in reverse
video. To move the highlighting bar up and down the list, use the arrow
keys. If you press the arrow keys on your keyboard's number pad, be sure
to turn the <NumLock> key off, or the keys will not work as you
expect. If you press the v key, the bar shifts down one row on the list.
Pressing the ^ key moves the bar up one row.
You can page up or page down by pressing, respectively, the keys
<PgUp> and <PgDn>. The key <Home> moves the cursor to the
top of the list, and <End> moves it to the bottom. If your terminal
does not implement these keys, you can use the following control
characters:
<ctrl-N> Next page (like <PgDn>)
<ctrl-P> Previous page (like <PgUp>)
<ctrl-A> Beginning (top) of list (like <Home>)
<ctrl-E> End (bottom) of list (like <End>)
Note that if the list of files and directories is too large to fit into the
window, moving the bar to the bottom of the window and pressing v will
scroll the list. If you press the <End> key, the row moves to the
last row in the list; and if you press <Home>, it moves to the top of
the list.
A scroll bar runs down the right side of the File Window. As you scroll up
and down this window, the scroll bar moves. Note that the position of the
scroll bar is proportional to the highlighting bar's position in relation
to the entire list of files, not just to its current position within the
File Window. This gives you an easy way to see just where you are in the
entire file list.
If you position the highlighting bar over the name of a directory and press
<return>, vsh names that directory in the Current Directory Window and
displays its contents in the File Window. For example, if you position the
highlighting bar over the entry for directory [letters] and press <return>,
vsh displays the contents of directory letters in the File Window. (If you
are familiar with the Bourne or Korn shell, this has the same effect as
typing the command cd letters.) To return to the directory you had just
been displaying (that is, the parent directory of letters), use the arrow
keys to move the highlighting bar to the entry [..]; then press <return>.
vsh changes the contents of the Current Directory Window, and in the File
Window erases the contents of letters and displays the contents of its
parent directory.
If you press <return> while a file is highlighted instead of a directory,
vsh does the following:
1. If the file is executable, vsh executes it.
2. If the file matches a pattern from the file-action list, vsh executes
the action from the list with the file as input. The file-action list
is in file $HOME/.vsh; it looks like:
[Mm]akefile:make
*.mk:make -f %F
*.sh:sh %F
*.c:cc -c -O %F
*.sc:sc %F
*.a:ar tv %F | more
*.[1-9]:nroff -man %F | more
*.tar.F:fcat %F | tar xvf -
*.F:fcat %F | more
*.tar.Z:zcat %F | tar xvf -
*.Z:zcat %F | more
vsh recognizes most common wildcard characters; for a table of these and
their meaning, see the Lexicon entries for wildcards. The token %F
stands for the file that is currently highlighted. For example, in the
above example the entry *.Z:zcat %F means that if you select a file with
the suffix .Z (which usually means that a file has been compressed), it
passes that file to zcat to uncompress and display it. vsh defines many
defaults for you when it creates this file, which you can use as a
model. To change the file-action list, use the File actions sub-command
of the Install command, which is described below.
3. If the file appears to be ASCII vsh displays it with the default viewer.
While vsh is working, it displays a large letter `X' in reverse video in
the lower right corner of the screen. This shows that vsh is doing some
internal task. vsh cannot accept any commands while the `X' is displayed,
so please be patient.
Also, note that vsh cannot handle more than 1,000 files in any given
directory. If a directory contains more than 1,000 files, only the first
thousand will be available for use.
System Window
The system window is the upper of the two windows on the right side of the
screen. The cursor never enters this window; rather, this window simply
displays information about your COHERENT system, and how you are currently
using it. It contains the following entries:
System:
This gives the name of your system, as you (or your COHERENT system
administrator) has set it in file /etc/uucpname. See the Lexicon's
entry for uucpname for more details on proper naming conventions for
COHERENT systems.
Line:
This gives the device by which you are accessing your COHERENT system.
If you are working on your system's console device, then you should
see console on this line; whereas if you are accessing your COHERENT
via a PC plugged into serial port com1l, you should see com1l here.
If you are using virtual consoles, the line is shown as mono[0-8] or
color[0-8]. See the Lexicon entries for console and asy for more
information about the devices through which you can access a COHERENT
system.
Login:
This gives the name under which you logged into COHERENT. For
example, if your login identifier is fred, then you should see fred on
this line.
UID: This shows your user-identification number (or UID). This is the
unique number by which your COHERENT system knows you, as set in file
/etc/passwd. For information on the UID and how to set it, see the
Lexicon entries for passwd and setuid.
GID: This gives the number and name of the user group to which you belong.
Users on a COHERENT system can be organized into groups; permissions
on files can be set to include the members of your group, but exclude
all others. For information on groups, see the Lexicon entries for
group and setgid.
Date:
This gives today's date (or rather, what your COHERENT system thinks
today's date is).
Time:
This gives what your system thinks the current time is. If your
system's time is not set correctly, then the time shown here will not
be correct. For information on how to set the system time, see the
Lexicon entries for the commands ATclock and date.
The time can also vary depending upon what time zone your COHERENT
system thinks it's located in. For information on timezones and how
to set them correctly, see the Lexicon entry for TIMEZONE.
Command Window
The Command Window is the top window, and stretches across the width of the
screen. This window gives you access to vsh's commands. Some commands in
the command window actually open an entire menu of commands, with which you
can perform all manner of work.
The command window contains the following entries. For convenience, the
following displays the entries vertically; the actual window displays them
horizontally:
File
Directory
Options
Install
Command
Refresh
Exit
Help
When the cursor is in the File Window (which is the default) and you wish
to execute one of the commands in the Command Window, press its initial
letter. For example, to execute the Refresh command, press R.
Note that the commands on this window are in two groups. A command's
behavior differs, depending upon which group it belongs to.
The commands File, Directory, Options, and Install display a drop-down menu
when you invoke it. That is because they have more than one option
available under it. If you do not wish to invoke any of the sub-commands
on that menu, you can do either of the following: You can press the
<Esc> key, which erases the drop down-menu and returns you to the
File Window; or you can press the <- or -> keys, which move you to the
command in this group that lies, respectively, to the left or to the right
of the current command. For example, suppose that you were in the File
Window, and you pressed F, to invoke the File command. vsh would move the
cursor into the Command Window, and display the File Command's drop-down
window, which displays its sub-commands. If you then pressed the
<Esc> key, vsh would return you to the File Window. If you pressed
the -> key, vsh would erase the File command's drop-down window and
display, instead, the drop-down window for the Directory command. If,
however, you pressed the <- key, vsh would erase the File command's drop-
down window and display, instead, the drop-down window for the Help
command. As you can see, vsh ``wraps-around'' the cursor -- it considers
the command at the far right to be to the left of the command to the far
left, and vice versa. This concept is a little difficult to grasp when you
read about it, but once you try it, it will quickly become clear.
Please note that vsh delays for one second its reaction to the <esc>
key. The curses function wgetch(), which is used to read the keyboard,
needs this delay so it can distinguish between the <esc> key and the
other function keys, which all of which start with an <esc>. So,
please be patient.
The other group of commands are the commands Command, Refresh, Exit, and
Help each have only option, so when you invoke one of them, it immediately
begins to execute that option. When you access one of these commands
through the -> and <- keys, each displays a drop-down menu that shows its
one option.
The following describes each command in detail.
File Pressing F invokes the File command. This displays a drop-down menu
that lists a set of sub-commands. These sub-commands let you
manipulate files; with them, you can edit a file, create a file,
change its permissions, rename it, erase it, print it, or do other
common tasks.
To invoke a sub-command, you can do either of the following: Press the
letter in the sub-command that is underlined (each sub-command has its
own unique letter with which you can invoke it); or use the ^ and v
keys to move the highlighting bar to that command, and then press
<return>.
The following discusses each sub-command in detail:
Copy This sub-command copies a file. Please note that the behavior of
this subcommand depend upon whether you have tagged files.
If you have tagged one or more files, vsh opens a pop-up window
that requests the path name of a directory. By default, vsh
displays the destination directory, if you have set one. When
you enter the path name, vsh copies every tagged file into that
directory.
If you have not tagged any files, vsh opens a pop-up window that
requests that you enter a file name or a path name. Again, if
you have set a destination directory, the window displays it by
default. If you enter only a file name into this window, vsh
copies the highlighted file into the newly named file in the
current directory; if you have named an existing file, vsh
prompts you before it overwrites that file. If you enter a path
name, vsh copies the highlighted file into the directory you have
named; the copied file retains its current name. If, however,
you enter both a file name and a path name, then vsh copies the
highlighted file into the directory you named, and gives it the
file name that you entered.
Note that this command will not overwrite a file that you do not
own; nor will it create a new file in a directory in which you do
not have write permission, or copy a file on which you do not
have read permission. For more information on copying files
under COHERENT, see the Lexicon entry for the command cp.
Move This sub-command prompts you for the name of a directory; if you
have set a destination directory, vsh displays it by default.
When you confirm the destination, vsh then moves all tagged files
into it. (If no files are tagged, vsh moves only the highlighted
file. For more information on tagging, see the entry for the
sub-command Tag, below.) The files retain their names in the new
directory.
This command does not move a file for which you do not have read
permission, or move a file into a directory into which you do not
have write permission; nor will it move a file into a non-
existent directory (of course). For details on moving files, see
the Lexicon entry for the command mv.
Delete
This sub-command deletes the tagged files. (If no files are
tagged, then it deletes only the highlighted file. For more
information on tagging, see the entry for the sub-command Tag,
below.) It will prompt you to confirm that you really do want to
delete the file or files in question. With regard to the mass
deletion of tagged files, this sub-command lets you choose
whether to do a mass deletion or delete files one at a time.
Note that this sub-command will not delete a file that you do not
own. For details on deleting files, see the Lexicon entry for
the command rm.
Rename
This sub-command lets you rename the highlighted file. It opens
a pop-up window that shows the current name of the file, and
prompts you to type the new name. Press <Esc> to abort
this sub-command, or type the new name and press <return>.
It does not work with directories. It will not let you rename a
file that you do not own. For details on renaming a file, see
the Lexicon entry for the command mv.
Execute
This sub-command executes the highlighted file. vsh prompts you
to type the arguments you wish to pass this file, then invokes
the file with those arguments.
Note that vsh will not execute a file for which you do not have
execute permission.
Access
This sub-command lets you change the manner in which every tagged
file can be accessed. (If no files are tagged, the default is
the highlighted file.) When you invoke it, vsh displays the
following pop-up window for each tagged file:
Change access f file filename
Owner
Read [x] Write[x] Execute[ ]
Group
Read [x] Write[ ] Execute[ ]
World
Read [x] Write[ ] Execute[ ]
Special
Set UID [ ] Set GID [ ] Set sticky[ ]
An `x' in a field means that that permission is turned on; a
blank means that it is turned off. Use the arrow keys to move to
the cursor the field whose status you wish to change, then enter
a space or `x' to, respectively, turn off or turn on that given
permission. To abort this command, press <Esc>.
For information what permission fields mean, see the Lexicon
entry for ls. Note that you can reset permissions only on the
files you own.
Owner
This lets you change the owner and group that owns each tagged
file. If no files are tagged, then this applies only to the
highlighted file. When you invoke this sub-command, vsh opens a
pop-up window that shows the user and group that own a file: type
the name of the user or group you want to own the file. vsh
repeats this step for each tagged file. To abort this command,
press <Esc>.
For details on changing ownership of a file, see the Lexicon
entries for the command chown and chgrp. Note that only the
superuser root can run this command.
Print
This passes every tagged file to the print spooler for printing.
To change the default print spooler, use the Install command's
Print spooler sub-command.
Note that vsh simply passes the file to the spooler for printing;
you cannot use this to process a file before printing it. If you
try to use this feature of vsh to print a file on a PostScript
printer, the printer will hang. We suggest that you use the
Command feature to print a file on a specialized printer; it's a
little more difficult, but it works. Another approach is to use
the spooler lp and prepare a special backend script to do the
processing automatically. For details on how to do that, see the
Lexicon entries for lp and printer.
View This sub-command invokes the default viewer to display the
contents of every tagged file. If you try to view the contents
of a binary file, the results may not be what you expect.
Note that vsh will not display a file for which you do not have
read permission. To change the default viewer, use the Install
command's File viewer sub-command.
Edit This sub-command invokes the text editor to edit every tagged
file. If no files are tagged, then edit only the highlighted
file.
The default text editor is vi, which can create problems for
persons who do not know how to exit from that editor. For a
quick brush-up on vi, see the Lexicon entry for elvis. To change
the default text editor, use the Install command's Editor sub-
command. Note that COHERENT will not let you edit a file for
which you do not have read permission.
Edit new
This sub-command prompts you to type the name of a file, then
invokes the editor for that file. This can be a new file (that
is, one that does not yet exist in the current directory), or a
file that already exists.
Note that if you do try to edit a binary file, you may find
yourself running into difficulties.
Touch
This ``touches'' every tagged file -- that is, it changes the
date and time that the file was last modified, just the same as
if you had just edited it.
Note that you cannot touch a file for which you do not have write
permission. For more information on touching files, see the
Lexicon entry for the command touch.
Tag all
This sub-command ``tags'' every file in the current directory.
This lets you do mass moves or deletions of files. When you tag
a file, vsh updates the entries Files tagged and File size ta. in
the Status Window, to reflect the number and total size of the
files you have just tagged. It also prints an asterisk next to
the tagged file.
When the cursor is in the File Window, you can toggle tagging on
the highlighted file by pressing the space bar. Note that the
highlighted file is implicitly tagged, whether an as asterisk
appears next to it or not. For details, see the section on the
Status Window, below.
Untag all
This sub-command untags all files that are tagged in the current
directory. As noted above, you can toggle the tagging of the
highlighted file by pressing the space bar. This command updates
the Status Window to reflect your changes.
Select
This sub-command opens a pop-up window and lets you enter a
regular expression; it then tags all files that match the
expression. For example, if you enter *.c, then this sub-command
tags all files that end in the string .c.
File type
This sub-command prints a summary of information about the type
of the highlighted file.
File info
This sub-command opens a pop-up window that displays the
following information about the highlighted file or directory:
Filename
Filetype
I-Node
Links
Owner UID
Owner GID
access
modification
status changed
Filename is the name of the file. Filetype is its type, e.g.,
directory or regular file. I-Node gives the number of this
file's i-node; for information on what an i-node is, see its
entry in the Lexicon. Links gives the number of links to the
file. For information on what a link is, see the Lexicon entries
for ln and link(). Owner UID and Owner GID identify the owner and
group that own this file. For information on what the UID and
GID are, see the Lexicon entries for setuid and setgid. access,
modification, and status changed give, respectively, the date and
time the file was last accessed, last modified, or last had its
status changed.
Directory
Pressing D invokes the Directory command. This displays a drop-down
menu that lists a set of sub-commands. These sub-commands let you
manipulate directories; with them, you can create a directory, remove
a directory, change permissions, and other common tasks. You can also
manipulate a ``directory stack,'' which lets you jump quickly from one
directory to another without having to retype its name.
The following discusses each sub-command in detail:
Change
This lets you change the current directory. When you invoke this
subcommand, vsh displays the following pop-up window:
Enter destination path
Type the full path name of the directory you wish to enter. If
this directory does not exist, or if you cannot access it, vsh
leaves you in the current directory; otherwise, it moves you to
the requested directory.
Home This moves you to your home directory.
User's Home
This moves you to the home directory of another user. When you
invoke this sub-command, vsh asks you to name the user whose home
directory you wish to enter. To abort, press <Esc>. If the
user you enter does not exist or if you do not have permission to
read her home directory, vsh leaves you in the current directory;
otherwise, vsh moves you into that user's home directory.
Set dest
Set the destination directory. This directory is saved in your
.vsh file, and is restored the next time you invoke vsh.
Push The next three sub-commands makes it easy for you to maneuver
your way around the COHERENT file system. The work by using what
is called a ``directory stack''. In effect, you can tell vsh to
remember the directory you are in (this is termed ``pushing'' the
directory onto the stack); then, when you have switched to
another directory, you can returned to this directory simply by
``popping'' this pushed directory from the directory stack. This
lets you move around among directories without having to retype
them continually.
The Push sub-command pushes the current directory onto the
directory stack. When you push a directory, vsh increments the
number next to the entry Dir. Stack in the Status Window. This
tells you how many directories you have pushed onto the directory
stack.
Pop & cd
This sub-command moves you to the last directory you pushed onto
the directory stack. It also removes that directory from
directory stack. When you pop a directory from the directory
stack, vsh decrements the number next to the entry Dir. Stack in
the Status Window. This tells you how many directories remain on
the directory stack.
Note that directories are popped in the order opposite from that
in which they were entered. For example, if you pushed directory
/usr/bin/sys onto the directory stack, then directory
/usr/lib/mail, then /bin, invoking the Pop sub-command will
return you to directory /bin, then to /usr/lib/mail, and finally
to directory /usr/include/sys.
Switch
This command switches the current directory and the top entry in
the directory stack.
Copy This copies the highlighted directory plus all of its contents
into another directory whose name you type into a pop-up window.
It behaves much like the command cpdir.
Delete
This deletes the highlighted directory. It does not work with
files. If the directory has files in it, vsh will prompt you and
ask if you want the directory to vanish. If you answer `Y', then
vsh removes it, files and all -- just as if you had executed the
command rm -rf.
vsh will not delete a directory that you do not own.
Rename
This sub-command renames the highlighted directory. vsh opens a
pop-up window and prompts you to type the new name of the
directory. Press <Esc> to abort this sub-command. Note
that you can rename only directories that you own. This sub-
command does not work with files.
Create
This sub-command creates a new directory in the current
directory. vsh prompts you for the name of the new directory,
and then creates it. Note that you can create a directory only
if you have write permission in the current directory.
Access
This lets you reset the access permission on the highlighted
directory. This is the directory equivalent of the File
command's Access sub-command.
Owner
This lets you reset the user and group that own a given
directory. This is the directory equivalent of the File
command's Owner sub-command. Note that only the superuser root
can run this command.
Read new
This tells vsh to re-read the current directory. vsh copies the
contents of the current directory into memory for its own use;
thus, if other people manipulated the directory and its contents
after vsh read its contents, what you see in the File Window will
not reflect the true state of affairs in that directory. If you
are working with a directory that is being manipulated by one or
more other people, you should issue this command from time to
time, to ensure that you are working with an accurate image of
the directory's contents.
Switch CWD
This command switches the current working directory with the
destination directory.
Switch TOS
This switches the destination directory with the directory on top
of the stack.
Info This is the same as the File info sub-command under the File
command, described above.
Options
Pressing O invokes the Options command. Its sub-commands let you
perform common system tasks. The following discusses each sub-command
in detail:
Shell
This command invokes an interactive shell. When you exit from
the shell (either by typing exit or <ctrl-D>), you will be
returned to vsh.
By default, vsh invokes the Bourne shell sh; to change the
default shell, use the Shell sub-command under the Install
command, which is described below.
Lock terminal
This command locks your terminal. When the terminal is locked,
no command can entered into it; this lets you walk away from your
terminal briefly without worrying whether anyone (e.g., your cat)
will do anything untoward under your login. The terminal remains
locked until you retype the secret password that you entered when
you invoked this sub-command
When you invoke this sub-command, a pop-up window appears with
the following:
Lock Enter Password
vsh prints a `#' to echo each character that you type. If you
wish to abort the Lock sub-command, press <Esc>. When you
have finished entering your password, press <return>. When you
have entered the password, the following window appears:
This Terminal is locked!
Enter Password to unlock
or hit return to logoff
Type the password to return to vsh. If you (or someone else)
presses <return>, you will be logged out of COHERENT.
Messages
This sub-command lets you receive or ignore messages. A message
can be sent to your terminal by another user or another process;
for example, the mail command may send a prompt to your screen
when new mail is received.
When you invoke this sub-command, vsh displays the following pop-
up window:
Do you want to receive messages ?
Yes No
Use the -> and <- keys to select the option you want, then press
<return>. When you change your message status, the information
in the Status Window changes. For example, when you turn off
messaging, the following appears at the bottom of the Status
Window:
You can't get messages
For information on how COHERENT sends messages to your terminal,
see the Lexicon entry for mesg. Also, see the description of the
Status Window, below.
Online manual
This lets you select an entry from the COHERENT system's on-line
manual pages. When you invoke this sub-command, vsh displays the
following pop-up window:
Enter topic, chapter is optional :
Topic:
Chapter:
Type the title of the Lexicon entry that interests you; for
example, to see the Lexicon entry for the command vsh, enter vsh
in the Topic slot, then type <return>. Do not enter anything
into the Chapter slot; this does not apply to the COHERENT
system. You will see on your screen the Lexicon entry that you
are now reading. If you change your mind, press <Esc> to
abort this command.
Note that if you did not install or uncompress the manual pages
when you installed your COHERENT system, this sub-command will
not work. For more information on the COHERENT manual pages, see
the Lexicon entries for the commands help and man.
System news
Display news about your current system. By default, this invokes
the COHERENT command msgs.
Internet news
Invoke a reader for Internet news. By default, this command
invokes rn, should you have it installed.
Electronic mail
Invoke your mail reader. By default, this invokes mail.
Install
Pressing I invokes the Install command. Its sub-commands let you
modify some of vsh's default behaviors; in particular, it lets you
program your function keys to execute some tasks you select with one
keystroke. The following discusses each sub-command in detail:
Display
This command lets you customize appearance of vsh. When you
invoke this sub-command, vsh displays the following pop-up
window:
Display Attributes
Menubar
Menu color
Menu attribute
Dialog box
The entry Menubar lets you select the display attribute for the
menu bar, which can be one of bold, underline, or reverse.
The entry Menu color lets you set the menu color, which can be
either normal or reverse. (This may vary, depending on the type
of terminal you are using.)
The entry Menu attribute lets you set the display attribute for
pulldown menus, which can be one of bold, underline, bold, or
normal.
Finally, the entry Dialog box lets you set the display attribute
for dialogue boxes, which can be one of bold, underline, or both.
The best way to see what these commands do is to try them out.
As mentioned above, the behavior may change from device to
device, depending upon the type of terminal that you are using.
Function keys
This lets you ``program'' up to nine function keys, so you can
invoke selected commands easily. Each user can have her own list
of programmed function keys.
When you invoke this sub-command, vsh displays the following
drop-down menu:
Function keys
Function key 1
Function key 2
...
Function key 9
Press 1 through 9 to program the corresponding function key (or
use the ^ and v keys to move then highlighting bar, then press
<return>). vsh asks you to enter the label for the function key
and the command you want that function key to invoke. When you
have finished, the new label will appear in the corresponding
function-key tag at the bottom of the screen; and when you press
that function key, vsh executes the corresponding command.
For example, to make the game chase one of your function key
entries, do the following: First, press I to invoke the Install
command. The press k to invoke the Function keys sub-command.
When the function-keys drop-down menu appears, press 2, for
function-key F2. When the label pop-window appears, type chase
into the first slot, which holds the label Press <Tab> to
jump to the second slot, which holds the command to execute, then
type /usr/games/chase. When you have done typing, press <return>.
As you can see, the F2 stub at the bottom of the screen shows
chase; and when you press F2, vsh launches you into chase. You
can program the first nine function keys to work in the same way.
You can embed the token %F as a placeholder for the current file.
For example, to count the number of lines in the current file,
put the following command into a function-key definition:
wc -l %F
Because some computers still do not have function keys (e.g., the
NeXT machine), you can also use the number keys to execute
commands installed on the function keys.
By the way, for information on the highly amusing game chase, see
its entry in the Lexicon.
Shell
This sub-command lets you set the default shell that vsh runs
when you invoke its Shell command. When you invoke this sub-
command, vsh displays the following pop-up menu:
Enter command to run a shell
(Coherent default is '/bin/sh')
/bin/sh
Type the shell that you want, either /bin/sh or /bin/ksh, and
press <return>. (You can enter another program if you like, but
you may get some strange results if you do.) For information on
each shell, see its entry in the Lexicon.
Editor
This lets you set the editor that vsh invokes when you select the
Edit sub-command under the File command. When you invoke the
Editor sub-command, vsh displays the following pop-up window:
Enter command to run an editor
(Coherent default is 'vi')
vi
Type the editor that you want, one of ed, me, or vi; then press
<return>. For information on each editor, see its entry in the
Lexicon.
Print spooler
This lets you set the spooler that vsh invokes when you select
the Print sub-command under the File command. When you invoke
the Print spooler sub-command, vsh displays the following pop-up
window:
Enter command to run a print-spooler
(Coherent default is 'lpr -B')
lpr -B
Enter the spooler that you want. For more information on the
spooling commands available under COHERENT, see the Lexicon entry
printer.
Beginning with release 2.7 of vsh, this feature works with pipes.
vsh understands that the token %F represents the current file.
For example, if you have a PostScript printer, you will want
every file to be processed by the command prps before you print
it. Thus, enter the command:
prps %F | hpr -B
This tells vsh to filter each file through prps and pipe the
output to the laser-printer spooler hpr.
Some of this functionality may not be necessary under COHERENT
release 4.2, which implements the System-V lp print spooler. See
the Lexicon article printer for details.
File viewer
This lets you set the viewer that vsh invokes when you select the
View sub-command under the File command. When you invoke the
File viewer sub-command, vsh displays the following pop-up
window:
Enter command to run a file view utility
(Coherent default is 'more')
more
Enter one of more or scat. For information on how these commands
differ, see their entries in the Lexicon.
File action
As noted above, vsh has a list of default actions that it takes
when you select a file of a given type. For example, if you
invoke the File command, move the highlighting bar to a file with
the suffix .c and press <return>, vsh by default invokes the C
compiler cc to compile that file.
vsh stores in the file $HOME/.vsh the list of its default
actions. The File actions sub-command invokes a special editor
so you can edit this list.
When you invoke this option, vsh displays the following pop-up
window:
Edit actions list
Configure action
Use the ^ and v keys to move the highlighting bar to the item you
want; then press <return>.
When you select Edit actions list, vsh displays a pop-up window
that contains all of the default actions. The syntax of the
default actions is described above. Use the ^ and v keys to move
the highlighting bar to the action you wish to edit. To erase
the current line, press <ctrl-D>; to open a new line, press
<ctrl-I>.
To modify the line that is currently highlighted, press <return>.
When you do so, the highlighting bar disappears and a cursor
appears. Use the <- and -> keys to move the cursor to the point
you wish to change; typing inserts new text into the command,
whereas pressing <Backspace> erases text. When you have
finished modifying the current line, press <return>. To abort
modifying the current line, press <Esc>.
When you have finished modifying the action list, press
<Esc>. vsh records your changes into file $HOME/.vsh, and
returns you to the File window.
When you select the option Configure action, vsh displays a
window with the prompt
Show file actions before execution ?
The cursor is under the response y, for yes. If you accept this
option, vsh will prompt you for your confirmation before it
performs a default action. If you want vsh simply to go ahead
and perform its default without asking for your approval, press
the -> key to move the cursor to the option n, for no, and press
<return>.
Sys. news reader
Tell vsh what system news program you want it to invoke by
default.
Internet news
Tell vsh what Internet news reader you want it to invoke by
default.
Electronic mail
Tell vsh what mail reader you want it to invoke by default.
Command
The command Command lets you send a command directly to a COHERENT
shell. This lets you invoke commands that ordinarily are not
available through vsh.
Suppose, for example, that you decided you wanted to play a session of
the game tetris, and that you have not yet programmed tetris as one of
your function keys. Press C to invoke Command. vsh moves the cursor
moves to the bottom of the screen, and erases the row of boxes that
describe the function keys. You can now type the command you want, in
this case /usr/games/tetris. To run the command, press <return>; to
abort entering a command and return to vsh, type <Esc>.
When you press <return>, vsh runs the command you typed. When you
have finished playing tetris and have exited from it, vsh clears the
screen and displays the message:
Hit any key to continue ...
When you press a key, vsh redraws itself on your screen and returns
the cursor to the File Window.
(By the way, the COHERENT version of tetris is available as part of
COHware volumes 2 and 3. For information on obtaining COHware, see
the release notes that came with your copy of COHERENT.)
Command remembers the last 40 commands that you have issued. To
invoke a command that you previous issued through Command, press the ^
key. The last command you issued will appear in the command slot. If
you continue to press the ^ key, others commands appear, in reverse
order from when you issued them. If you overshoot the command that
you want to re-run, press the v key to walk back down the list of
previously issued commands. When you find the previously issued
command that you wish to rerun, just press <return> and vsh runs it
again.
You can also edit a previously issued command. The following gives
lists the available editing commands:
<- Move the cursor one character to the left
-> Move the cursor one character to the right
<del>Delete the character to the left
<backspace>Delete the character to the left
<ctrl-D>Delete the character over the cursor
<ctrl-P>Go to last character of the command
<ctrl-N>Go to first character of the command
A command can use environmental variables, such as $HOME. vsh will
expand all environmental variables correctly before it tries to
execute the command.
You can also embed the following tokens in a command:
%F Represent the currently highlighted file
%T Represent all tagged files
%D Represent the destination directory
For example, the command
cp %T %D
copies all tagged files into the destination directory.
Refresh
The command Refresh redraws the screen. It does no other work. This
is helpful if your screen has become jumbled or scrambled for any
reason -- such as a message being written onto your screen by another
user.
To invoke this command, type R. vsh pauses very briefly, then the
screen flickers as vsh redraws. If the screen had been confused for
any reason, invoking this command should restore to its proper state.
If you need to refresh the screen while a pop-up menu or a pop-up
window is active, press <cntl-L>.
Exit The command Exit exits you from vsh. To exit from vsh, press E. In
response, vsh pops the following window onto your screen:
Do you really want to quit?
Yes No
The window is in reverse video, for emphasis. The option Yes is
underlined, to show that it is the default choice. If you really do
wish to exit, press <return>; and vsh returns to the COHERENT shell.
If you changed your mind, however, and do not wish to exit, press the
-> key to change the option; this will shift the underlining from
option Yes to option No. Pressing enter at this point selects the No
option; vsh in response removes the pop-up window from the screen and
returns you to the File Window.
If you change your mind again, though, and really do wish to exit,
then press the <- key. The underlining shifts back to the Yes option;
and when you press <return> you exit from vsh and return to the shell.
Status Window
The Status Window is the lower window on the right side of the screen. The
cursor never enters this window; rather, this window gives information
about how vsh is functioning, and in particular about the files that are
currently displayed in the File Window.
The Status Window contains the following entries:
Files
This gives the number of files being shown in File Window. Note that
this is all files that can be scrolled through that window, not the
files that are shown in that window at this moment.
File size
This gives the total size, in bytes, of all files available through in
the File Window.
Files tagged
This gives the number of files that you have tagged. See the
description of the File command, above, for details.
File size ta.
This gives the total size of all tagged files. See the description of
the File command, above, for details.
Dir. Stack
This gives the number of directories that currently reside on the
directory stack. As noted above, you can ``push'' directories onto
the directory stack or ``pop'' them from it. By doing so, you have an
easy way to jump about from one directory to another, without having
to type directory names repeatedly. See the above description of the
Directory command for more details.
You can have a maximum of ten directories on the stack.
Mail This line indicates whether you have mail waiting to be read. If you
don't, this line will say
None
whereas if you do, the line will say
Avail
and flash at you. If new mail arrives, vsh flashes
New
in that slot.
mailbox
This line gives the name of your mailbox -- that is, the file that
mail reads.
messages
This indicates whether your terminal can receive messages -- e.g.,
whether a message will pop up on your screen if someone wishes to
communicate with you via the write command. For more information on
how to change the message status of your terminal, see the Lexicon
entry for the command mesg.
Function Keys
The bottom of the screen show nine small boxes in reverse video. These are
labelled F1 through F9. If you have defined the key using the Function Key
command, vsh displays the box the tag that you gave that key.
For example, in our above example we set key F1 to run the command ps -a,
and gave it the tag ps. At the bottom of the screen, the box labelled F1
should show ps.
For more details, see the description of the Function Key command, above.
Configuration File
vsh reads the file $HOME/.vsh to configure itself.
A typical .vsh file reads as follows:
cwd=/v/fwb
shell=/bin/ksh
editor=me
print-spooler=hpr -B
view=more
make=make
me-disp-attr=reverse
pd-disp-color=normal
pd-disp-attr=bold
se-disp-attr=underline
pfkey1= mail mail
pfkey9=tetris /usr/games/tetris
cmd=
tetris
tetris
echo foo
cwd points to the current working directory, that is, the directory in
which you have last worked with vsh. vsh returns you to that directory when
you next invoke the shell.
shell, editor, print-spooler, view, and make give, respectively, the shell,
editor, print-spooler, viewer, and make utility that you selected with the
Install command. If you change one of these values, the behavior of vsh
changes to reflect the change. For example, if you change the line
editor=me
to
editor=ed
then vsh will invoke ed the next time you request the File command' Edit
sub-command.
me-disp-attr, pd-disp-color, pd-disp-attr, and se-disp-attr give the
display features for, respectively, the menu bar, the menu color, the menu
attribute, and the dialogue box.
The lines pfkey1 through pfkey9 set the behavior of the function keys. The
first seven characters after the equal sign `=' give the text that appears
in stub at the bottom of the screen. Everything after the first seven
characters describes the command to be executed when you press that
function key.
The text that follows the line cmd= lists the commands that you have
executed with the command Command. You can embed the following tokens in a
command:
%F Represent the currently highlighted file
%T Represent all tagged files
%D Represent the destination directory
These are used just as they are with the Command command, described above.
Command-line Options
vsh recognizes the following options:
-ddirectory
Enter vsh and begin to work in directory. If no directory is named, then
begin work in the current directory vsh normally begins in the last
directory used in your last vsh session.
-e Do not use the graphic character set. This option coarsens the
appearance of vsh, but gives it a fighting chance to run on cheap
terminals that do not implement the full alternate character set of the
DEC VT-100 terminal.
-i Restrict the user's ability to run the Install command. In this mode,
vsh can be used as a restricted shell, especially if it is embedded in
/etc/passwd.
-r Restrict the shell. This option turns off the following:
-> The command Command
-> No interactive shell can be called from the Options menu
-> Most options from the Directory menu
-> Most options from the Install menu
This lets the system administrator restrict the activity of users fairly
strongly.
-t This command-line option tells vsh to assume the entire VT-100 mapping.
This is useful with terminals whose system definitions are incomplete,
or the alternate character set is ignored.
Files
$HOME/.vsh -- Configuration file
See Also
commands,
ksh,
sh,
terminfo,
ttytype,
Using COHERENT
Notes
vsh was written by Udo Munk:
--------------------------
[At this point, this document displays an image from an encapsulated
PostScript file. Unfortuately, this cannot be displayed under nroff.
Our apologies!]
--------------------------
To reach Udo, send e-mail to udo@mwc.com.






