package matrix
Build not yet checked sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Fast, modern terminal toolkit for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
mosaic-0.3.0.tbz
sha256=a92cbbcbe016fb19fb0a749222da0e459a9567aef3f4c7340d9bd6b71c53ed6f
sha512=6a7ab054605538bb31a2b73a1a6d093981a2704c9f0af5852221c05735290d74aca7c7282298c4d0f91e86a800e2ccd94b4918af883cd963449c758eb6b272b3
doc/src/matrix.ansi/styling.ml.html
Source file styling.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33type t = [ `Plain | Color.depth ] type choice = [ `Auto | `Always | `Never ] let choices = [ ("auto", `Auto); ("always", `Always); ("never", `Never) ] let variables = [ "NO_COLOR"; "FORCE_COLOR"; "CLICOLOR_FORCE"; "CLICOLOR" ] (* An empty variable is unset, as NO_COLOR, force-color.org and bixense's CLICOLOR all say. *) let get getenv name = match getenv name with Some "" | None -> None | Some _ as v -> v (* FORCE_COLOR and CLICOLOR_FORCE force colors unless they are 0 or false, the values Node's tools read as off: a force read wrongly writes escapes into a file, where a refusal read wrongly only prints plain text. *) let forced getenv name = match get getenv name with | None | Some ("0" | "false") -> false | Some _ -> true let decide ?(color = `Auto) getenv ~tty ~dumb (colors : [< Color.depth ]) : t = let colors = (colors :> t) in match color with | `Always -> colors | `Never -> `Plain | `Auto -> let force = forced getenv "FORCE_COLOR" || forced getenv "CLICOLOR_FORCE" in if not (force || (tty && not dumb)) then `Plain else if Option.is_some (get getenv "NO_COLOR") then `Mono else if force then colors else if get getenv "CLICOLOR" = Some "0" then `Mono else colors
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>