Show Version 1.0 (C) 1994 by Jeff Shepherd Table of Contents Installation What is show? Using Show Show Preferences program Man program About Show About The Author ToDo 2. Installation NOTE: At least Workbench 2.04 is needed to run show!!! Show comes complete with an Installer script. Just double-click on the "Show_Install" icon and proceed. There are three versions of show - Show_020ffp and Showprefs_020ffp can be used if your Amiga has a >= 68020 processor with a FPU. Show_020 and Showprefs_020 can be used if your Amiga have a >= 68020 processor. Show and showprefs can be used with any combination of processor and FPU. The script installs two programs - the show preferences program and the show program itself. The installation procedure can sense that a previous version of Show was installed and asks if you want to overwrite it. You have the option to install the sample prefs file that came with this archive. I would suggest that you install the sample preferences then edit the entries later using the preferences program. 3. What is Show? Just what exactly is Show? Show is a program that associates suffixes with commands. Here is an example. In the preferences file the suffix ".doc" associated with "more". To display the file "foo.doc" just type show foo.doc and it will be displayed using the program more. I use the word suffix loosely. The "suffix" does not have to be at the end of the filename it can occur at the beginning or anywhere in the filename. The prefix "mod." is associated with mod files even though the filename starts with "mod." Commands can be as simple as a program name or as complex as multiple commands. In the sample preferences supplied with this package, a complex command is used for the suffix ".1". This command is useful when you have unix man pages stored in their original Troff format. I have included a simple alternative for UN*X man command stored in the man directory included with this archive. Click on man for more details. 4. Using Show Show can be run either from the Workbench by clicking on its icon or by the CLI CLI Usage: Typing show with no arguments will show the following message: USAGE: show [-f suffix] filename [[-f suffix] filename2...] The -f parameter forces the filename to be associated with a certain suffix. Note that -f changes the suffix for the next filename only. To override the suffix of two or more files, you must specify -f suffix for all the files. If a suffix is not recognized in the filename or the suffix specified with -f is invalid the following message will appear: ERROR: suffix in not found where is the filename specified from the command. Show also works with wildcards. For example: show #?.guide will invoke a Multiview (if Multiview is associated with .guide in the preferences program) for each guide file in the current directory. WB Usage Starting Show from Workbench, works a little bit differently than starting Show from the CLI. First if the selected files have an .info file, Show looks for the SHOWSUFFIX tooltype to determine which suffix to look for. If no .info is found, Show looks for suffixes in the filename. Show can be started on its own or by multiselecting Show with other files by holding the SHIFT key and selecting files. Double-clicking Show with no other icons opens an ASL requester. You can choose one file or many using multiple file selection. Selection continues until CANCEL is hit. 5. Show Preferences Program The Show preferences program is used to create the preferences file. The preferences file is used by show to hold the suffixes and commands associated with them. When you enter the Show preferences program the following screen will appear: +------------------------------------------------------+--+--+ +------------------------------------------------------+--+--+ | Show V1.0 | | ©1994 Jeff Shepherd Suffixes | | +-------------+-+ | | Suffix | | | | | +-------------+ | | | | | +-------------+ | | | | | | | | | | Command | | | | | +-------------+ | | | | | +-------------+ | | | | | +-------------+-+ | | Asynchronous +---+ +----+ +---+ | | +-+ |New| |Copy| |Del| | | +-+ +---+ +----+ +---+ | | +------+ +-----+ +--------+ | | | Save| | Use| | Cancel | | | +------+ +-----+ +--------+ | | | +------------------------------------------------------------+ Here are the Preferences Menus. They function as close as possible to the ones used by the Workbench preferences programs. Project Menu ------------ Open Save As... About Quit Edit Menu --------- Last Saved Restore Note on the preference program I have made the preferences program as font-adaptive as possible. The text used by the preference program is the "System Default Font" of the Font preferences. If the window cannot be fit into the screen using this font, the preferences program will default to topaz 8. Also if the font changes while the preferences program is still running, it will close itself and re-render itself using the new fonts. Also if the screenmode changes, the preferences program will reopen itself on the new screen. I don't think any preferences program can boast these features!!! Preference Gadgets and Menus ---------------------------- Suffixes The Suffixes listview shows a list of the currently defined suffixes. Use the up and down arrows to reveal more suffixes. To select a suffix just click on its name, the Suffix box, Command box and Asynchronous checkbox will show the suffix, command and Asynchronous flag respectively for the suffix. Suffix Allows you to edit the suffix of the currently suffix. If no suffix is selected anything you type will be ignored. Make sure you press ENTER after you are done to allow the new suffix to be registered. Command Allows you to edit the command of the currently suffix. If no suffix is selected anything you type will be ignored. Make sure you press ENTER after you are done to allow the new command to be registered. Asynchronous If the Asynchronous checkbox is checked, the command is executed asynchronously ie the program regains control immediately although the command may still be executing. The way I implemented asynchronous command execution is tack a "RUN >NIL:" in front of the command. The drawbacks of doing so is that any errors that might occur will never be shown. If you type "show " and nothing happens, clear the Asynchronous checkbox through the preferences program and run the command again. New Makes a new node a places it at the front of the suffix list. The suffix defaults to (New Suffix). To edit the suffix or command, click on the string edit box and change the string. Make sure you press RETURN when finished. Copy Copies the currently selected node and places the new node on top of the suffix list. If no node was selected, this gadget does nothing. Follow the instructions for the New gadget.This option is good when you have multiple suffixes using the same command. Del Deletes the currently selected node. If no node was selected, this gadget does nothing. NOTE: You cannot get back what you have deleted from this command. Save Saves the preferences files in ENV: and ENVARC: and exits the program. Use Saves the preferences files in ENV: and exits the program. The new preferences will be erased when the computer is turned off. Cancel Exits the preferences program without saving anything. Open Open a previously saved preferences file. An ASL requester will appear to allow you to choose a file. The default file is SYS:prefs/presets/prefs.presets. Save As... Allows you save the preferences file under a different name. An ASL requester will appear to allow you to save the file. The default name is SYS:prefs/presets/show.presets. About Brings up a requester showing the version of Show and little text about myself. Click OK to end the requester. Quit Quits the preferences program without saving the preferences file. It is the same as pressing the CANCEL gadget. Last Saved Restores the preferences that were last saved using Save. Restore Restores the preferences that were loaded when the preferences program began. 5. Man program Included in the man directory of this archive is my alternative for the UN*X man command. It displays man pages only. You cannot use 'man -k' for keyword searches or anything else. To use the man program, you need the program csh or sh. If you don't have either one, csh can be found on aminet in the directory util/shell. If you have man pages stored in Troff format you will also need groff to process them. If you need groff, contact myself or grab the groff binary on aminet under the util/gnu directory. It would also be wise to install the sample preferences included with this archive since it has the necessary commands for dealing with unix man pages. If you did not, the suffixes .0, .1 up to .9 need to be defined along with the commands for them. To install man, rename the old man program (if an older one exists) and copy the contents of the man directory to wherever you want man installed. Add the installed directory to your path if necessary. To configure man, edit the files man and man.sh. The comments contained therein are self-explanatory. 6. About Show Show is COMMENT/BUGWARE. This means if have you have any bugs/comments just email me and I will be happy to answer them. Also no fee can be charged for distributing this program except for a nominal fee for disks. Permission is given to Fred Fish to distibute this program with his Fish disk library. The source is included. RCS is needed to view the source code. I suggest getting HWGRCS found on aminet in dev/misc. Although Show is essentially FREEWARE the copyright is kept by myself. 7. About the Author I am a third-year student at the University of Waterloo in Waterloo, ON, Canada. I am majoring in Computer Science with Electrical Engineering Electives or CS/EEE for short. If you have any suggestions, comments or bugs feel free to email me at: jsshephe@undergrad.math.uwaterloo.ca or if you prefer snail-mail: Jeff Shepherd 47 Columbia West Waterloo, ON N2L 3K4 Being a co-op student, I move around a lot. Using my email address is preferred since it is always redirected to where I am working at the moment. 8. TODO - Added wildcards to suffixes. - Make show pure. - Add locale options to the preference program and show.