PINFO(1) | General Commands Manual | PINFO(1) |
pinfo - is user-friendly, console-based viewer for Info documents
pinfo [options] [infopage]
This is a program for viewing info files. You specify which page you want to read by passing it an infopage argument. This argument contains the name of an info page (i.e. 'bash'). The program will then (by default) search for it in the current directory, /usr/share/info, /usr/info, /usr/local/share/info, /usr/local/info. and /opt/info. The search path can be adjusted by INFOPATH environment variable or in the configuration file. Pinfo will also automatically add the suffix '-info', '-info.Z', '-info.gz', or '-info.bz2'.
When the search for info pages fails, man is called with the infopage argument, and its output is parsed by pinfo. This means that when you don't have the appropriate info page, but have a man page instead; the man page will be viewed.
When no infopage is specified, the default `dir' page is shown.
Supported options are
-h, --help - print help information and exit.
-v, --version - print version information and exit.
-m, --manual - uses manual page instead of info by default. (pinfo -m could be used as a manual pager). Warning: Everything what follows this option is passed to the `man' program. Don't be confused if pinfo options, which followed `-m' don't work. When using this option, pinfo does not parse the info options as usual! It invokes the man part of program.
You can also call the man function of pinfo in another way. When pinfo is called with an argv[0] (the program file name), which contains the word 'man' in its name, the man functions are enabled automatically.
Previously there was a symlink to pinfo, called pman, but I had to remove it from the distribution, since its name was in conflict with some other utility. Anyway, you can feel free to create such a link if you wish.
-r, --raw-filename - uses a raw filename first (i.e. the name which you specified as infopage is considered to be a real file in the specified location).
-f, --file synonym for -r.
-a, --apropos - if this is set, apropos is called when no man or info page could be found.
-c, --cut-man-headers - if this is set, man parsing code will try to cut out the repeated man headers. Use with care. ;)
-s, --squeeze-lines- cut empty lines from manual pages. This option enables auto cutting of every repeated newline in a manual page.
-t, --force-manual-tag-table- forces manual detection of tag table. This allows you to view info pages, which may be corrupted. (as i.e. version of jed's pages, shipped with RH5.0). The tag table corruption usually appears in that the info links, which you follow, move you to quite unexpected nodes.
--node=nodename, --node nodename- Go to the node `nodename' of info file. Since 0.6.7 it is also possible to specify nodes as in standalone info via file names, like `(gcc)Introduction'.
--rcfile=filename, --rcfile filename- Use alternate configuration file.
--long-manual-links, -l- Use long link names in manuals. On some systems the manual hierarchy is divided into subsections like `3ncurses', etc, while on other systems all belongs to section `3'. If this option is what your system is like, feel free to use it.
--clear-at-exit, -x- Clear screen at exit.
The options are handled by GNU getopt, so you can here (as in other programs) abbreviate the option names to the minimal number of characters by which the options differ.
Warning! If you do not have getopt, these options will not work!
Just take a look at the example configuration file (below), and at the key descriptions. Keys available in manual viewer differ a bit from the keys available in info viewer.
There is a variable $INFOPATH, which can specify the paths to be searched for info files. It's format is similar to that of the $PATH variable. An example setting could look like:
/usr/info:/usr/somewhere/info:/not/even/in/usr/info
etc. Directories are separated by colons.
There are configuration files called ~/.pinforc and [prefix]/etc/pinforc, for local and global configuration (where prefix is the prefix of the directory, where pinfo is installed, i.e. /usr/local, or /). Here's an example of such a file; we'll discuss the contents below:
# Here are some color setting. # Whitespace between the entries is optional. COL_NORMAL = COLOR_WHITE, COLOR_BLACK, NO_BOLD, NO_BLINK COL_MENUSELECTED = COLOR_RED, COLOR_BLACK, BOLD, NO_BLINK COL_MENU=COLOR_BLUE,COLOR_BLACK,BOLD, NO_BLINK COL_NOTESELECTED=COLOR_RED,COLOR_BLACK,BOLD, NO_BLINK COL_NOTE=COLOR_GREEN,COLOR_BLACK,BOLD, NO_BLINK COL_TOPLINE=COLOR_YELLOW,COLOR_BLUE,BOLD, NO_BLINK COL_BOTTOMLINE=COLOR_YELLOW,COLOR_BLUE,BOLD, NO_BLINK COL_MANUALBOLD=COLOR_WHITE,COLOR_BLACK,BOLD, NO_BLINK COL_MANUALITALIC=COLOR_WHITE,COLOR_BLACK,BOLD, NO_BLINK COL_URL=COLOR_MAGENTA,COLOR_BLACK,BOLD, NO_BLINK COL_URLSELECTED=COLOR_RED,COLOR_BLACK,NO_BOLD, NO_BLINK COL_INFOHIGHLIGHT=COLOR_WHITE,COLOR_BLACK,BOLD, NO_BLINK # # Here are some keybindings as well... # KEY_TOTALSEARCH_1 = 's' KEY_TOTALSEARCH_2 = 'S' KEY_SEARCH_1 = '/' KEY_SEARCH_2 = '.' KEY_GOTO_1='g' KEY_GOTO_2='m' KEY_HOME_1='h' KEY_HOME_2='H' KEY_PREVNODE_1='p' KEY_PREVNODE_2='P' KEY_NEXTNODE_1='n' KEY_NEXTNODE_2='N' KEY_UP_1=KEY_UP KEY_UP_2='u' KEY_END_1= KEY_END_2='e' KEY_PGDN_1=KEY_NPAGE KEY_PGDN_2=' ' KEY_PGDN_AUTO_1=0 KEY_PGDN_AUTO_2=' ' KEY_PGUP_1=KEY_PPAGE KEY_PGUP_2='b' KEY_PGUP_AUTO_1=0 KEY_PGUP_AUTO_2='b' KEY_DOWN_1=KEY_DOWN KEY_DOWN_2='d' KEY_TOP_1=KEY_HOME KEY_TOP_2='t' KEY_BACK_1=KEY_LEFT KEY_BACK_2='l' KEY_FOLLOWLINK_1=KEY_RIGHT KEY_FOLLOWLINK_2='0 # 12 is a code for ctrl+l KEY_REFRESH_1=12 KEY_REFRESH_2='~' KEY_SHELLFEED_1='!' KEY_SHELLFEED_2='1' KEY_QUIT_1='q' KEY_QUIT_2='Q' KEY_DIRPAGE_1='d' KEY_DIRPAGE_2='D' KEY_GOLINE_1='l' KEY_GOLINE_2=0 KEY_PRINT_1=']' KEY_PRINT_2=0 # # Some options, explained in the man page # MANUAL=false CUT-MAN-HEADERS=true CUT-EMPTY-MAN-LINES=true RAW-FILENAME=false APROPOS=false DONT-HANDLE-WITHOUT-TAG-TABLE=false LONG-MANUAL-LINKS=false FILTER-0xB7=true QUIT-CONFIRMATION=false QUIT-CONFIRM-DEFAULT=no CLEAR-SCREEN-AT-EXIT=true STDERR-REDIRECTION="2> /dev/null" HTTPVIEWER=lynx FTPVIEWER=lynx MAILEDITOR=pine MANLINKS=1:8:2:3:4:5:6:7:9:n:p:o:3X11:3Xt INFOPATH=/usr/info:/usr/share/info:/usr/local/info HIGHLIGHTREGEXP=Bash.*has SAFE-USER=nobody SAFE-GROUP=nobody
As you can see, the format is simple. First I'll explain the color definitions. First you must enter a color name (all available color names are present in the example, and they're self explanatory, I think. There is also a special color COLOR_DEFAULT, which stands for transparency). Then you enter the foreground color, and the background color. The BOLD attribute means that we want the foreground color to be highlighted. (i.e. light blue, light green). BLINK attribute is the blinking attribute, or highlighted background in some other configurations.
Now let's move to the key definitions. Here we first put a key name (again all keys are present in the example); then we enter its value -- either surrounded by apostrophes, or a keycode number (like in KEY_REFRESH_1), or its mnemonic code name if its a special key (like i.e. in KEY_FOLLOWLINK_1).
If you wish to specify key by code value, use the supplied program 'testkey' to obtain the needed value. It mainly is a feature, when you want to add some CTRL+letter keybindings, and similar.
For each function you can bind two keys, i.e. you could bind both Enter and Cursor Right to the FollowLink-function. As you can see in the example above, the two key names are KEY_FOLLOWLINK_1 and KEY_FOLLOWLINK_2.
Here's an explanation of the key names:
The special mnemonics for keys (which are defined at present) are:
Warning! Try not to create some serious key binding conflicts!
The options in the last part of the example configuration file should be fairly self-explanatory. The variables that can be set to true or false do the same things as the command line arguments with the same names.
Pinfo implements general features of gnu gettext library (the thing, which you need to see national messages ;). But it is not the end. Pinfo allows you to use national info pages! You only need to put them to your info directory, into a subdirectory, which is called `$LANG'.
This program is distributed under the terms of GPL.
Please send bug reports to the author.
Przemek Borys <pborys@dione.ids.pl> Bas Zoetekouw <bas@debian.org>
There was also a lot of other people, who contributed to this code. See the AUTHORS file.
The author would like to read some comments and suggestions from you, if any.
01 Dec 2001 |