|
SynopsisAccess the CIAO help documentation. Syntaxahelp [-n width] [-s|-m|-l|-w|-i] subject ahelp [-n width] [-s|-m|-l|-w|-i] context subject ahelp [-n width] -b blockname [-t attribute] subject ahelp [-n width] -b blockname [-t attribute] context subject ahelp [-n width] -c context about keyword DescriptionThe ahelp command accesses the CIAO on-line documentation. By default it displays an ASCII version of the help file, although it can be used to cause HTML versions to be shown in a web browser using the "-i" or "-w" flags. The CIAO site contains HTML versions of the help files, which are also available on the European mirror site. Finding help for a given subjectThe help files are arranged by subject into contexts (both subject and context are a single word) and you access these files by either: unix% ahelp <subject> or unix% ahelp <context> <subject> depending on whether or not there are help files with the same subject but different contexts (ahelp will tell you if you need to specify a context). The ahelp tool is case insensitive when it comes to matching the subject and context values. Searching for helpIf you do not know the exact subject (for a tool, the subject is just the tool name), then you enter unix% about <keyword> for a list of subjects related to your query (ie whatever value you use for <keyword>). To find out all the entries for a given context you use unix% ahelp -c <context> If a search only returns one match then that page is automatically displayed, otherwise you will see a list of subjects, with context and synopsis, that match the search. Using regular expressionsThe CIAO 3.0 release of ahelp adds the ability to use a regular expression when specifying any of the subject, context, or keyword in a search. So, to find a list of all the keywords that contain the text "par", you need to say: unix% ahelp /par/ and to list all help files with contexts that begin with "sl": unix% ahelp -c /^sl/ This feature can be very useful when trying to search for help on a particular subject, since unix% about /bin/ will list all help files whose references include the text "bin" (so this would match bin, rebin, and binned amongst others). There are a number of resources that describe the extended regular expression syntax used here: "man regexp" may provide details (depending on what system you are using) and there are many pages on the internet. Listing specific sections of the help fileThe "-b blockname" option, introduced in CIAO 3.0, is used to restrict the output to a given section of the help file. This can be useful if you only need specific information, such as the list of known bugs, description of a specific parameter, or the syntax of a given command. Allowed values for the "-b blockname" option
It is not guaranteed that a help file will contain all these sections. The "Structure of a help file" section at the end of this file provides more details on what is included in a help file. Finding help in ChIPS and SherpaThe "ahelp" and "about" commands can also be used at the ChIPS and Sherpa prompts to access the help files. The context - if not explicitly specified - is taken to be the name of the tool (ie chips or sherpa). When using regular expressions it is best to surround them in single or double quotes. Command-line optionsThe most useful options are given below. If no option is supplied, ahelp defaults to -l.
Options for the CIAO developerThere are several other options that are only useful to CIAO developers and those that install the CIAO software.
Configuring ahelpAhelp uses the PAGER environment variable to find the program to use to page the ASCII output to the screen: examples of suitable values are more or "less -s". If you make use of the "-b" option in ahelp a lot it may be worth setting up aliases for them. For instance, the following csh/tcsh commands unix% alias bugs 'ahelp -b BUGS ' unix% alias params 'ahelp -b PARAM ' unix% alias examples 'ahelp -b QEXAMPLELIST ' provide easy access to the bugs, parameter, and examples section of a help file - if they exists - by saying "bugs dmstat", "params aconvolve" ("params -t kernelspaec aconvolve" to list an individual parameter), or "examples dmfilth". The "Choosing a web browser" section below the Examples describes how you can change what web browser to use when ahelp is called with either the -i or -w flag. Example 3about grating Displays a list of subjects that are cross-referenced using the keyword "grating". it is equivalent to unix% ahelp -k grating Example 4ahelp /struct/ Lists all help files with a subject that contains the text "struct". If there is only one match then that help file will be displayed, otherwise the subject, context, and synopsis information for each matching file will be found. Example 5about /struct/ Lists all help files which are cross-referenced by a string that contains the text "struct". Example 6ahelp /stk/ ahelp tools /stk/ The regular-expression support can be combined with restricting a search to a particular concept. The first ahelp call lists all help files whose subject contains "stk", whereas the second one restricts the search to those subjects in the "Tools" concept. Example 7ahelp -c sherpa Gives a list of all available subjects within the `sherpa' context, along with their synopsis. Example 11ahelp -b PARAM -t infile dmcopy Displays the description of the infile parameter of dmcopy. Example 12ahelp -b ADESC dmstat There may be additional text in a help file after the examples/parameters but before the BUGS section. These are referred to as ADESC sections, and may have a title (if so they will be numbered). in this example we display all such sections from the dmstat help file. Example 13ahelp -b ADESC -t 'CHANGES IN CIAO3.0' dmstat If an "ADESC" section has a title then you can select just that section using the "-t" option. Here we display the 'CHANGES IN CIAO 3.0' section of the dmstat help file (note that the number preceeding the section title - in this case '1.' - should not be included in the "-t" option). Example 15ahelp -w dmcopy Displays the HTML version of the dmcopy help file in a web browser (Netscape by default). See the section below on "Choosing a web browser" for information on how to change the browser. The HTML file displayed is included in the CIAO distribution - in the directory $ASCDS_INSTALL/doc/html/ - so a connection to the internet is not required (unlike the -i option). Example 16ahelp -i dmcopy Displays the HTML version of the dmcopy help file from the Ahelp pages of the CIAO web site. See the section below on "Choosing a web browser" for information on how to change the browser. Since the HTML file being displayed is from the CIAO web site - unlike the -w flag - then a connection to the internet is required. The advantage over using the -i option is that the version of the help file on the CIAO web site may be more recent than the version in the CIAO distribution. Example 17ahelp -n 35 chips Displayes help information about chips formatted as 35 columns per line. Example 18ahelp -n 100 -b PARAMLIST acis_process_events Displayes help information on the parameters of acis_process_events assuming there are 100 columns per line. One useful trick is to use taskmonitor to display the output: unix% taskmonitor "ahelp -n 100 -b PARAMLIST acis_process_events" & Example 19ahelp -s -f /mydir/myfile.xml Processes the supplied file and displays a short version of the help information stored in /mydir/myfile.xml. Example 20ahelp -r /mydir/ Re-creates the database of the help files located in /mydir/doc/xml/ and /mydir/contrib/doc/xml/. CHOOSING A WEB BROWSERIf you use the -i or -w flags than ahelp will display the help file in a web browser rather than in the terminal window. The default browser that is used is Netscape, and it will re-use an existing Netscape browser if one already exists when ahelp is called. It is possible to change both which browser is used and its behaviour by adding to (or changing) the file .CXCdefaults in your home directory (see 'ahelp gui' for further information on this file). The default values for these fields - which can be found in $ASCDS_INSTALL/config/system/CXCdefaults - are: *HelpBrowser : netscape *HelpBrowserDelay : 3 *HelpBrowserOpenURLCommand : netscape -remote 'openURL($)' *HelpBrowserOpenFILECommand : netscape -remote 'openFile($)' The meanings of the fields is given in the following table:
All '$' signs in the "OpenURL" and "OpenFILE" command strings will be replaced by the name of the file or URL to display (if you need to include a dollar sign then use '\$'). As an example, with the default settings, unix% ahelp -i dmcopy will use the HelpBrowserOpenURLCommand value of netscape -remote 'openURL($)' which will be expanded to netscape -remote 'openURL(http://cxc.harvard.edu/ciao/dmcopy.html)' Below we provide a number of configurations suitable for some of the more popular web browsers. First we list the values suitable for the Solaris and Linux platforms. Mozilla*HelpBrowser : mozilla *HelpBrowserDelay : 3 *HelpBrowserOpenURLCommand : mozilla -remote 'openURL($)' *HelpBrowserOpenFILECommand : mozilla -remote 'openFile($)' KonquerorWith the following settings a new konqueror session will be started each time 'ahelp -i' or 'ahelp -w' is used. *HelpBrowser : *HelpBrowserDelay : *HelpBrowserOpenURLCommand : konqueror $ & *HelpBrowserOpenFILECommand : konqueror $ & KonquerorWith the following settings, 'ahelp -i' or 'ahelp -w' will use an existing konqueror (starting one if it does not). *HelpBrowser : konqueror *HelpBrowserDelay : 3 *HelpBrowserOpenURLCommand : dcop `dcop konqueror-\* | head -1` konqueror-mainwindow\* 'openURL(QString)' $ *HelpBrowserOpenFILECommand : dcop `dcop konqueror-\* | head -1` konqueror-mainwindow\* 'openURL(QString)' $ Lynx*HelpBrowser : *HelpBrowserDelay : *HelpBrowserOpenURLCommand : xterm -e lynx $ & *HelpBrowserOpenFILECommand : xterm -e lynx $ & Opera*HelpBrowser : opera *HelpBrowserDelay : 3 *HelpBrowserOpenURLCommand : opera -remote 'openURL($)' *HelpBrowserOpenFILECommand : opera -remote 'openFile($)' For OS-X systems the configuration options look a little different: Safari*HelpBrowser : *HelpBrowserDelay : *HelpBrowserOpenURLCommand : open $ & *HelpBrowserOpenFILECommand : open -a Safari file://$ & Mozilla (on OS-X)*HelpBrowser : *HelpBrowserDelay : *HelpBrowserOpenURLCommand : open $ & *HelpBrowserOpenFILECommand : open -a Mozilla file://$ & CHANGES IN CIAO 3.1Consistent behavior with the -i/-w flagsThe ahelp command now behaves the same whether you used the "-i" or "-w" flag or not. Prior to the CIAO 3.1 release, commands like "ahelp -i stat" would fail, claiming to be unable to find any information on the subject, whereas "ahelp stat" would return a list of matches. Now this list is also displayed when "-i" or "-w" are used. Choice of web browserIn CIAO 3.0.2 only the first '$' character in the "*HelpBroswerOpen*Command" strings would be expanded to contain the file to display. In CIAO 3.1 all '$' characters are expanded. CHANGES IN CIAO 3.0.2Choice of web browserIn CIAO 3.0.2 ahelp was changed to allow the web browser used by "ahelp -i" and "ahelp -w" to be configured rather than always using Netscape. Note that the default browser is Netscape on all platforms, including OS-X. See the "Choosing a web browser" section above for further information. CHANGES IN CIAO 3.0Using regular expressionsIn CIAO 3.0 it is possible to use a regular expression when giving the subject, context, or keyword when calling ahelp. The syntax used for the regular expression matches that of the UNIX extended regular expression standard. Listing a specific section of the help fileThe -b option can be used to list a specific part of the help file, such as the bugs section or the parameter list. Specifying the context for a subjectAs of CIAO 3.0 you no longer need to use the -c option to specify the context if you are also giving the subject. So, what used to require unix% ahelp -c varmm print is now just unix% ahelp varmm print The -c is still required if only the context is given. Removal of extraneous control charactersThe text output of ahelp no longer ends in unwanted control characters when the PAGER environment variable is set to "less". STRUCTURE OF A HELP FILEThe basic layout of a help file is as follows (although some sections will not appear in all files).
To find out if any issues or bugs have come to light since the release please visit the bugs section of the CIAO web pages. BugsSee the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs. |
The Chandra X-Ray
Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA. Email: cxcweb@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2004. All rights reserved. |