Run.host: def of cli@0.2.0.0 Import: import cli@0.2.0.0/run.bend as Run Lines 81-91 of cli@0.2.0.0/run.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/run.bend&start_line=81&end_line=91 import Base import cli@0.2.0.0/cli.bend as Cli # ยง7.3: the variables c reads, whether stdout and stderr are TTYs, and their # columns; Cli.probe decides the rest. def host(c: Cli.Cmd) -> IO(Cli.Host): do IO: vars : List<&2, Cli.Var> <- read_vars(Cli.vars(c)) out_tty : U32 <- Sys.isatty(1) err_tty : U32 <- Sys.isatty(2) out_cols : U32 <- Sys.columns(1) err_cols : U32 <- Sys.columns(2) return Cli.probe(vars, U32.is_eq(out_tty, 1), U32.is_eq(err_tty, 1), out_cols, err_cols) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Cmd https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Host https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Var https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=probe https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=vars https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/run.bend&name=Sys.columns https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/run.bend&name=Sys.isatty https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/run.bend&name=read_vars