Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ show(1mh) — Ultrix WS 2.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mhl(1mh)

more(1)

next(1mh)

pick(1mh)

prev(1mh)

scan(1mh)

show(1mh)

NAME

show − show (list) messages

SYNTAX

show [+folder] [msgs] [−draft] [−header] [−noheader] [−showproc program] [−noshowproc] [switches for  showproc] [−help]

DESCRIPTION

Use show to display the contents of the current message.  You can specify alternative messages or folders by using the <+folder> or <msgs> arguments.  In the following example, show will display the contents of message 36, in the current folder, on the screen.

$ show 36

If a folder is given, it will become the current folder. The last message shown will become the current message.

You can specify a number of messages or a range of messages using the <msgs> argument. If you specify more than one message; the default showproc, more, will prompt for a <RETURN> prior to listing each message.

Typically, the messages are listed exactly as they are, with no reformatting.  A program named by the showproc profile component is invoked to do the listing, and any switches not recognized by show are passed along to that program. The default program is known as more. The more command lists each message, a page at a time. When the end of the page is reached, more waits for a <SPACE> or <RETURN>. If you press <RETURN>, more will print the next line.  If you press the spacebar, more prints the next screen of data. At the end of the message, more will automatically return you to the system prompt.  Press q to quit from more before you have finished reading the message. 

OPTIONS

To override the default and the showproc profile component, use the −showproc program switch. In the following example, show will cause the pr() program to list the current message.

$ show −showproc pr

The MH command mhl can be used as a showproc to show messages in a more uniform format.  See mhl() for more details. If you are going to use the same showproc all the time, it is advisable to specify it in your .mh_profile. You can specify any switches, that the specified show program normally takes, after the −showproc option. If the −noshowproc option is specified, /bin/cat is used instead of showproc.

The −header switch tells show to display a one-line header, which contains the folder and the message number.

If the standard output is not a terminal, no queries are made, and each file is listed with a one-line header and two lines of separation. 

The command show −draft will list the file <mh−dir>/draft if it exists.

If the profile entry Unseen−Sequence is present and non-empty, then show will remove each of the messages shown from each sequence named by the profile entry. This is similar to the Previous−Sequence profile entry supported by all MH commands which take msgs or msg arguments.

This command has the following default settings:

+folder defaults to the current folder
msgs defaults to cur
−format
−header

RESTRICTIONS

The −header switch does not work when msgs expands to more than one message. If the showproc is mhl, then this problem can be circumvented by referencing the messagename field in the mhl format file.

The command show updates your context before showing the message. Hence show may mark messages as seen before you actually see them. However, this is generally not a problem, unless you are using the unseen messages mechanism, and you interrupt show while it is showing unseen messages.

If showproc is mhl, then show uses a built-in mhl: it does not actually run the mhl program. Hence, if you define your own showproc, do not call it mhl since show will not run it.

If more() is your showproc (the default), then avoid running show in the background with only its standard output piped to another process.  In the following incorrect example, show will go into a tty input state.

$ show | print &

To avoid this problem, re-direct show’s diagnostic output as well.
For users of csh:

$ show |& print &

For users of sh:

$ show 2>&1 | print &

FILES

$HOME/.mh_profile The user profile

PROFILE COMPONENTS

Path: To determine the user’s MH directory
Current-Folder: To find the default current folder
Unseen-Sequence: To name sequences denoting unseen messages
showproc: Program to show messages

SEE ALSO

mhl(1mh), more(1), next(1mh), pick(1mh), prev(1mh), scan(1mh)

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