1PINFO(1) General Commands Manual PINFO(1)
2
3
4
6 pinfo - curses based lynx-style info browser
7
9 pinfo [options] [infopage]
10
12 This is a program for viewing info files. You specify which page you
13 want to read by passing it an infopage argument. This argument contains
14 the name of an info page (i.e. 'bash'). The program will then (by
15 default) search for it in the current directory, /usr/share/info,
16 /usr/info, /usr/local/share/info, /usr/local/info. and /opt/info. The
17 search path can be adjusted by INFOPATH environment variable or in the
18 configuration file. Pinfo will also automatically add the suffix
19 '-info', '-info.Z', '-info.gz', or '-info.bz2'. At present other suf‐
20 fixes are not recognized, but you can easily add them to the function
21 openinfo() in filehandling_functions.c.
22
23 When the search for info pages fails, man is called with the infopage
24 argument, and it's output is parsed by pinfo. This means that when you
25 don't have the appropriate info page, but have a man page instead; the
26 man page will be viewed.
27
28 When no infopage is specified, the default `dir' page is shown.
29
30 Supported options are
31
32 -h, --help - print help information and exit.
33
34 -v, --version - print version information and exit.
35
36 -m, --manual - uses manual page instead of info by default. (pinfo -m
37 could be used as a manual pager). Warning: Everything what follows this
38 option is passed to the `man' program. Don't be confused if pinfo
39 options, which followed `-m' don't work. When using this option, pinfo
40 does not parse the info options as usual! It invokes the man part of
41 program.
42
43 You can also call the man function of pinfo in another way. When pinfo
44 is called with an argv[0] (the program file name), which contains the
45 word 'man' in it's name, the man functions are enabled automatically.
46
47 Previously there was a symlink to pinfo, called pman, but I had to
48 remove it from the distribution, since it's name was in conflict with
49 some other utility. Anyway, you can feel free to create such a link if
50 you wish.
51
52 -r, --raw-filename - uses a raw filename first (i.e. the name which you
53 specified as infopage is considered to be a real file in the specified
54 location).
55
56 -f, --file synonym for -r.
57
58 -a, --apropos - if this is set, apropos is called when no man or info
59 page could be found.
60
61 -p, --plain-apropos - if this is set, call only apropos.
62
63 -c, --cut-man-headers - if this is set, man parsing code will try to
64 cut out the repeated man headers. Use with care. ;)
65
66 -s, --squeeze-lines- cut empty lines from manual pages. This option
67 enables auto cutting of every repeated newline in a manual page.
68
69 -d, --dont-handle-without-tag-table - don't display texinfo pages with‐
70 out tag table.
71
72 -t, --force-manual-tag-table- forces manual detection of tag table.
73 This allows you to view info pages, which may be corrupted. (as i.e.
74 version of jed's pages, shipped with RH5.0). The tag table corruption
75 usually appears in that the info links, which you follow, move you to
76 quite unexpected nodes.
77
78 --node=nodename, --node nodename- Go to the node `nodename' of info
79 file. Since 0.6.7 it is also possible to specify nodes as in standalone
80 info via file names, like `(gcc)Introduction'.
81
82 --rcfile=filename, --rcfile filename- Use alternate configuration file.
83
84 --long-manual-links, -l- Use long link names in manuals. On some sys‐
85 tems the manual hierarchy is divided into subsections like `3ncurses',
86 etc, while on other systems all belongs to section `3'. If this option
87 is what your system is like, feel free to use it.
88
89 --clear-at-exit, -x- Clear screen at exit.
90
91 The options are handled by GNU getopt, so you can here (as in other
92 programs) abbreviate the option names to the minimal number of charac‐
93 ters by which the options differ.
94
95 Warning! If you do not have getopt, these options will not work!
96
98 Just take a look at the example configuration file (below), and at the
99 key descriptions. Keys available in manual viewer differ a bit from the
100 keys available in info viewer.
101
103 There is a variable $INFOPATH, which can specify the paths to be
104 searched for info files. It's format is similar to that of the $PATH
105 variable. An example setting could look like:
106
107 /usr/info:/usr/somewhere/info:/not/even/in/usr/info
108
109 etc. Directories are separated by colons.
110
111
113 There are configuration files called ~/.pinforc and [prefix]/etc/pin‐
114 forc, for local and global configuration (where prefix is the prefix of
115 the directory, where pinfo is installed, i.e. /usr/local, or /).
116 Here's an example of such a file; we'll discuss the contents below:
117
118 # Here are some color setting.
119 # Whitespace between the entries is optional.
120 COL_NORMAL = COLOR_WHITE, COLOR_BLACK, NO_BOLD, NO_BLINK
121 COL_MENUSELECTED = COLOR_RED, COLOR_BLACK, BOLD, NO_BLINK
122 COL_MENU=COLOR_BLUE,COLOR_BLACK,BOLD, NO_BLINK
123 COL_NOTESELECTED=COLOR_RED,COLOR_BLACK,BOLD, NO_BLINK
124 COL_NOTE=COLOR_GREEN,COLOR_BLACK,BOLD, NO_BLINK
125 COL_TOPLINE=COLOR_YELLOW,COLOR_BLUE,BOLD, NO_BLINK
126 COL_BOTTOMLINE=COLOR_YELLOW,COLOR_BLUE,BOLD, NO_BLINK
127 COL_MANUALBOLD=COLOR_WHITE,COLOR_BLACK,BOLD, NO_BLINK
128 COL_MANUALITALIC=COLOR_WHITE,COLOR_BLACK,BOLD, NO_BLINK
129 COL_URL=COLOR_MAGENTA,COLOR_BLACK,BOLD, NO_BLINK
130 COL_URLSELECTED=COLOR_RED,COLOR_BLACK,NO_BOLD, NO_BLINK
131 COL_INFOHIGHLIGHT=COLOR_WHITE,COLOR_BLACK,BOLD, NO_BLINK
132 #
133 # Here are some keybindings as well...
134 #
135 KEY_TOTALSEARCH_1 = 's'
136 KEY_TOTALSEARCH_2 = 'S'
137 KEY_SEARCH_1 = '/'
138 KEY_SEARCH_2 = '.'
139 KEY_GOTO_1='g'
140 KEY_GOTO_2='m'
141 KEY_HOME_1='h'
142 KEY_HOME_2='H'
143 KEY_PREVNODE_1='p'
144 KEY_PREVNODE_2='P'
145 KEY_NEXTNODE_1='n'
146 KEY_NEXTNODE_2='N'
147 KEY_UP_1=KEY_UP
148 KEY_UP_2='u'
149 KEY_END_1=
150 KEY_END_2='e'
151 KEY_PGDN_1=KEY_NPAGE
152 KEY_PGDN_2=' '
153 KEY_PGDN_AUTO_1=0
154 KEY_PGDN_AUTO_2=' '
155 KEY_PGUP_1=KEY_PPAGE
156 KEY_PGUP_2='b'
157 KEY_PGUP_AUTO_1=0
158 KEY_PGUP_AUTO_2='b'
159 KEY_DOWN_1=KEY_DOWN
160 KEY_DOWN_2='d'
161 KEY_TOP_1=KEY_HOME
162 KEY_TOP_2='t'
163 KEY_BACK_1=KEY_LEFT
164 KEY_BACK_2='l'
165 KEY_FOLLOWLINK_1=KEY_RIGHT
166 KEY_FOLLOWLINK_2='0
167 # 12 is a code for ctrl+l
168 KEY_REFRESH_1=12
169 KEY_REFRESH_2='~'
170 KEY_SHELLFEED_1='!'
171 KEY_SHELLFEED_2='1'
172 KEY_QUIT_1='q'
173 KEY_QUIT_2='Q'
174 KEY_DIRPAGE_1='d'
175 KEY_DIRPAGE_2='D'
176 KEY_GOLINE_1='l'
177 KEY_GOLINE_2=0
178 KEY_PRINT_1=']'
179 KEY_PRINT_2=0
180 #
181 # Some options, explained in the man page
182 #
183 MANUAL=false
184 CUT-MAN-HEADERS=true
185 CUT-EMPTY-MAN-LINES=true
186 RAW-FILENAME=false
187 APROPOS=false
188 DONT-HANDLE-WITHOUT-TAG-TABLE=false
189 LONG-MANUAL-LINKS=false
190 FILTER-0xB7=true
191 QUIT-CONFIRMATION=false
192 QUIT-CONFIRM-DEFAULT=no
193 CLEAR-SCREEN-AT-EXIT=true
194 STDERR-REDIRECTION="2> /dev/null"
195 HTTPVIEWER=lynx
196 FTPVIEWER=lynx
197 MAILEDITOR=pine
198 MANLINKS=1:8:2:3:4:5:6:7:9:n:p:o:3X11:3Xt
199 INFOPATH=/usr/info:/usr/share/info:/usr/local/info
200 HIGHLIGHTREGEXP=Bash.*has
201 SAFE-USER=nobody
202 SAFE-GROUP=nobody
203
204 As you can see, the format is simple. First I'll explain the color def‐
205 initions. First you must enter a color name (all available color names
206 are present in the example, and they're self explanatory, I think.
207 There is also a special color COLOR_DEFAULT, which stands for trans‐
208 parency). Then you enter the foreground color, and the background
209 color. The BOLD attribute means that we want the foreground color to be
210 highlighted. (i.e. light blue, light green). BLINK attribute is the
211 blinking attribute, or highlighted background in some other configura‐
212 tions.
213
214 Now let's move to the key definitions. Here we first put a key name
215 (again all keys are present in the example); then we enter it's value
216 -- either surrounded by apostrophes, or a keycode number (like in
217 KEY_REFRESH_1), or its mnemonic code name if it's a special key (like
218 i.e. in KEY_FOLLOWLINK_1).
219
220 If you wish to specify key by code value, use the supplied program
221 'testkey' to obtain the needed value. It mainly is a feature, when you
222 want to add some CTRL+letter keybindings, and similar.
223
224 For each function you can bind two keys, i.e. you could bind both Enter
225 and Cursor Right to the FollowLink-function. As you can see in the
226 example above, the two key names are KEY_FOLLOWLINK_1 and KEY_FOL‐
227 LOWLINK_2.
228
229 Here's an explanation of the key names:
230
231
232 KEY_TOTALSEARCH_1
233 Key for searching through all nodes of info file.
234
235 KEY_TOTALSEARCH_2
236 Alternate key for searching through all nodes of info
237 file.
238
239 KEY_SEARCH_1
240 Key for searching through current node (or manual).
241
242 KEY_SEARCH_2
243 Alternate key for searching through current node (or
244 manual).
245
246 KEY_SEARCH_AGAIN_1
247 Key for repeating the last search.
248
249 KEY_SEARCH_AGAIN_2
250 Alternate key for repeating the last search.
251
252 KEY_GOTO_1
253 Key for explicitly going to a node (by specifying it's
254 name).
255
256 KEY_GOTO_2
257 Alternate key for explicitly going to a node (by spec‐
258 ifying it's name).
259
260 KEY_PREVNODE_1
261 Key for going to a node marked as 'Prev' in the
262 header. In man page viewer this goes to the previous
263 man section.
264
265 KEY_PREVNODE_2
266 Alternate key for going to a node marked as 'Prev' in
267 the header. In man page viewer this goes to the previ‐
268 ous man section.
269
270 KEY_NEXTNODE_1
271 Key for going to a node marked as 'Next' in the
272 header. In man page viewer this goes to the next man
273 section.
274
275 KEY_NEXTNODE_2
276 Alternate key for going to a node marked as 'Next' in
277 the header. In man page viewer this goes to the next
278 man section.
279
280 KEY_UP_1 Key for scrolling text one line up.
281
282 KEY_UP_2 Alternate key for scrolling text one line up.
283
284 KEY_END_1 Key for going to the end of the node.
285
286 KEY_END_2 Alternate key for going to the end of the node.
287
288 KEY_PGDN_1
289 Key for going one page down in the viewed node.
290
291 KEY_PGDN_2
292 Alternate key for going one page down in the viewed
293 node.
294
295 KEY_PGDN_AUTO_1
296 Key for going to the next node when you're at the end
297 of node (default is zero -- turned off).
298
299 KEY_PGDN_AUTO_2
300 Alternate key for going to the next node when you're
301 at the end of node (default is space, as for pgdn_2).
302
303 KEY_HOME_1
304 Key for going to the beginning of the node.
305
306 KEY_HOME_2
307 Alternate key for going to the beginning of the node.
308
309 KEY_PGUP_1
310 Key for going one page up in the viewed node.
311
312 KEY_PGUP_2
313 Alternate key for going one page up in the viewed
314 node.
315
316 KEY_PGUP_AUTO_1
317 Key for going to the `up' node, when being at the top
318 of node. (Default value is zero -- turned off).
319
320 KEY_PGUP_AUTO_2
321 Alternate key for going to the `up' node, when being
322 at the top of node. (Default value is `-', as for
323 pgup_2).
324
325 KEY_DOWN_1
326 Key for scrolling the text down one line.
327
328 KEY_DOWN_2
329 Alternate key for scrolling the text down one line.
330
331 KEY_TOP_1 Key for going to the top (first) node.
332
333 KEY_TOP_2 Alternate key for going to the top (first) node.
334
335 KEY_BACK_1
336 Key for going back (in the history of viewed nodes).
337
338 KEY_BACK_2
339 Alternate key for going back (in the history of viewed
340 nodes).
341
342 KEY_FOLLOWLINK_1
343 Key for following a hypertext link.
344
345 KEY_FOLLOWLINK_2
346 Alternate key for following a hypertext link.
347
348 KEY_REFRESH_1
349 Key for refreshing the screen (hard coded is the ^L
350 value).
351
352 KEY_REFRESH_2
353 Alternate key for refreshing the screen.
354
355 KEY_SHELLFEED_1
356 Key for calling a shell command, and passing the
357 viewed node to the stdin of that command.
358
359 KEY_SHELLFEED_2
360 Alternate key for calling a shell command, and passing
361 the viewed node to the stdin of that command.
362
363 KEY_QUIT_1
364 Key for exiting the program.
365
366 KEY_QUIT_2
367 Alternate key for exiting the program.
368
369 KEY_GOLINE_1
370 Key for going to a specified line in file.
371
372 KEY_GOLINE_2
373 Alternate key for going to a specified line in file.
374
375 KEY_PRINT_1
376 Key for printing viewed node or man page.
377
378 KEY_PRINT_2
379 Alternate key for printing viewed node or man page.
380
381
382 The special mnemonics for keys (which are defined at present) are:
383
384
385 KEY_BREAK
386
387 KEY_DOWN
388
389 KEY_UP
390
391 KEY_LEFT
392
393 KEY_RIGHT
394
395 KEY_DOWN
396
397 KEY_HOME
398
399 KEY_BACKSPACE
400
401 KEY_NPAGE
402
403 KEY_PPAGE
404
405 KEY_END [Note: this works probably ONLY with Linux ncurses]
406
407 KEY_F(x)
408
409 KEY_CTRL('c')
410 - this assigns the key value to a ctrl+c combination.
411 c may be any letter you wish.
412
413 KEY_ALT('c')
414 - this assigns the key value to a alt+c combination. c
415 may be any letter you wish. If alt key won't work, you
416 may use ESC+key combination.
417
418 'c' - this means a printable character c. The syntax is
419 just like in C/C++ ;).
420
421 [number] - you can also specify key as it's code number. It is
422 useful e.g. when specifying control keys, and some
423 nonstandard keys. A numerical value of zero turns
424 given key binding off.
425
426 See manual page for curs_getch (3x) for description of their meaning.
427
428 Warning! Try not to create some serious key binding conflicts!
429
430 The options in the last part of the example configuration file should
431 be fairly self-explanatory. The variables that can be set to true or
432 false do the same things as the command line arguments with the same
433 names.
434
435
436 MANUAL If this is set to true the default is to first check
437 for a man page, instead of a texinfo file.
438
439 CUT-MAN-HEADERS
440 If set to true, then pinfo tries to cut off the
441 repeated headers throughout man pages.
442
443 CUT-EMPTY-MAN-LINES
444 If set to true, then pinfo tries to cut off the
445 repeated newlines (i.e. it will shorten each set of
446 consecutive newlines to one newline).
447
448 RAW-FILENAME
449 If set to true, the file argument is taken to be the
450 name of a file in the current working directory, i.e.
451 the directories in INFOPATH will only be searched if a
452 file with this name is not in the working directory.
453
454 APROPOS If set to true, apropos is called if no info or man
455 page is found.
456
457 DONT-HANDLE-WITHOUT-TAG-TABLE
458 If set to true , pinfo will not attempt to display
459 texinfo pages without tag tables.
460
461 HTTPVIEWER
462 Set this to the program you want to use to follow http
463 links in documents.
464
465 FTPVIEWER Set this to the program you want to use to follow ftp
466 links in documents.
467
468 MAILEDITOR
469 Set this to your favorite email program, and it will
470 be started if you follow an email link in a document.
471
472 PRINTUTILITY
473 Utility, which you use for printing. I.e. `lpr'. If
474 you don't use any, you may also try something like
475 `cat >/dev/lp1', or sth. ;)
476
477 MANLINKS This specifies the section names, which may be refer‐
478 enced in your man pages (i.e. Xtoolkit man pages match
479 the section 3Xt (see for example XtVaCreateWidget)
480 manpage), Xlib function pages match section 3X11, etc.
481 Such extensions may not be recognized by default, so
482 it is a good idea to add them).
483
484 INFOPATH This allows you to override the default search path
485 for info pages. The paths should be separated by
486 colons.
487
488 MAN-OPTIONS
489 This specifies the options, which should be passed to
490 the `man' program. (see man(1) for description of
491 what they're like).
492
493 STDERR-REDIRECTION
494 Pinfo allows you to redirect the stderr output of
495 called programs. For example if you don't want to see
496 man's error messages about manual page formatting, you
497 can use STDER-REDIRECTION="2> /dev/null". This is the
498 default.
499
500 LONG-MANUAL-LINKS
501 This is another true/false option, which decides
502 whether your system supports long manual section
503 names, or not. (i.e. "3ncurses" instead of "3").
504
505 FILTER-0xB7
506 This decides, whether you want to convert 0xb7 chars
507 to `o', or not. For example for iso-8859-2 fonts this
508 makes man's list marks a bit nicer ;) (look for exam‐
509 ple at perl's man page, to see how those marks look
510 like).
511
512 QUIT-CONFIRMATION
513 This decides whether you want to use quit confirmation
514 on exit, or not.
515
516 QUIT-CONFIRM-DEFAULT
517 This yes/no option determines the default answer to
518 the QUIT-CONFIRMATION dialog. (default answer is when
519 you press a key, that does not match the asked ques‐
520 tion).
521
522 CLEAR-SCREEN-AT-EXIT
523 This true/false option determines if you want to have
524 your screen cleared at exit, or no.
525
526 CALL-READLINE-HISTORY
527 This true/false option determines if you want to have
528 a prompt of last history entry whenever calling read‐
529 line wrapper, eg. in subsequent searches.
530
531 HIGHLIGHTREGEXP
532 This is an option, through which you may pass to pinfo
533 regexps, which should be highlighted when working with
534 document. Warning! This may turn very slow if you use
535 it without care!
536
537 SAFE-USER This option is used to pass the name of user, to which
538 suid when pinfo is run with root privileges.
539
540 SAFE-GROUP
541 This option is used to pass the name of group, to
542 which suid when pinfo is run with root privileges.
543
544
545
547 Pinfo implements general features of gnu gettext library (the thing,
548 which you need to see national messages ;). But it is not the end.
549 Pinfo allows you to use national info pages! You only need to put them
550 to your info directory, into a subdirectory, which is called `$LANG'.
551
552
554 This program is distributed under the terms of GPL.
555
556
558 Please send bug reports to the author.
559
560
562 Przemek Borys <pborys@dione.ids.pl>
563
564 If that E-mail address wont work (since the machine where it is being
565 handled is a bit damaged lately), you can try pborys@zeus.polsl.gli‐
566 wice.pl, or pborys@p-soft.silesia.linux.org.pl.
567
568 There was also a lot of other people, who contributed to this code. See
569 the AUTHORS file.
570
571
573 The author would like to read some comments and suggestions from you,
574 if any.
575
576
577
578
579 01 Dec 2001 PINFO(1)