package b0
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Software construction and deployment kit
Install
dune-project
Dependency
Authors
Maintainers
Sources
b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/b0.std/B0_pager/index.html
Module B0_pagerSource
Pager interaction.
Paging
The type for pagers.
Source
val find :
?search:B0_std.Cmd.tool_search ->
?cmd:B0_std.Cmd.t ->
no_pager:bool ->
unit ->
(t, string) resultfind ~search ~don't finds a suitable pager. This is (in order):
Ok pifno_pageristrueor if theTERMenvironment variable isdumbor undefined andcmdis unspecified. In this casedoes_page pisfalse.Ok porError _ifcmdis specified and according to whetherOs.Cmd.get ?search cmdsucceeds.Ok (Some pager)ifpageris a tool invocation parsed from thePAGERenvironment variable that can be found viaOs.Cmd.find ?search.Ok (Some pager)if eitherlessormorecan be found (in that order) viaOs.Cmd.find ?search.Ok Noneotherwise.
page_stdout p setups the program so that if does_page p is true, the standard output of the program is redirected to a spawn of of the pager with the following twists:
- If the environment variable
LESSis undefined in the current environment it is set toLESS=FRXfor the spawn ofcmd. - A
Stdlib.at_exitfunction is installed that flushesB0_std.Fmt.stdoutandStdlib.stdout, closesUnix.stdoutand waits upon thecmdspawn termination.
If does_page p is false this function has no effect.
page_files p fs uses pager to page the files fs. If does_page p is:
false, each of thefsfiles is output on stdout, in order, separated by a file separator character (U+001C).true, the pager's command is withfsas arguments, unlessfsis empty in which case this is a nop.
Cli interaction
no_pager ~docs () is a --no-pager command line option to unconditionally request not to use a pager. docs is the manual section where the option is documented, defaults to Cmdliner.Manpage.s_common_options.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page