This library script is for supporting REBOL console development and capturing output for perusal.
Note; more, less, page, and pager are all defined
>> more system >> more %myfile.r >> more/num/cap [repeat i 100 [print ["Radius" i "Area:" i * i * pi] ] ]
Including this tool is simple. Just DO it.
>>do %pager.r
or to execute this right out of the rebol.org library
>>do http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=pager.r
q | Quit out |
b | Back a page |
Enter, down arrow | Advance one line |
Backspace, Up arrow | Back one line |
digit '1' to '9' | Advance n lines |
> | To bottom |
< | To top |
/ | Find forward |
? | Find reverse |
g | Goto line |
n | Find next forward |
p | Find previous backwards |
w | weefresh screen |
h | help and info |
num: logic! | on or off for display of (source file) line numbers |
eof: logic! | true waits at end of file |
rows: integer! | The console is queried for this, but it can be overridden |
cols: integer! | Override the value the console reports |
>> help pager USAGE: PAGER intake /options electives /cap /n /num DESCRIPTION: supports b, <, >, w, /, ?, q while paging PAGER is a function value. ARGUMENTS: intake -- input data or filename (Type: any) REFINEMENTS: /options -- rows: cols: integer!, eof: num: logic! electives -- (Type: block) /cap -- input becomes block to evaluate and capture prin/t] /num -- shortcut (and override) for /options [num: on]
%pager.r | Original author: Brian Tiffin |