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