For Gauche 0.9.10

Next: , Previous: , Up: ライブラリモジュール - ユーティリティ   [Contents][Index]

12.62 text.pager - ページャーを用いた出力

Module: text.pager

A convenience module to present long text nicely to the user.

Parameter: pager-program

{text.pager} A parameter containing a list of pager program and its arguments (e.g. ("/usr/bin/less" "-M")).

The program must take input from the standard input.

The default value is taken from the environment variable PAGER if set, or either less or more if those programs are available on the system.

Function: display/pager string

{text.pager} Display string by a pager subprocess specified by the parameter pager-program. The procedure returns when the subprocess exits.

If the terminal is not suitable for control (e.g. TERM is dumb or emacs), string is simply displayed without a pager.

If you’re running MinGW version of gosh on mintty, calling subprocess pager doesn’t work well, so the procedure emulate the pager behavior (pager-program is ignored).

Function: with-output-to-pager thunk

{text.pager} Call thunk with its current output port to a string buffer, then show the buffered output using display/pager.

Note that the output begins after thunk returns.

Next: , Previous: , Up: ライブラリモジュール - ユーティリティ   [Contents][Index]