Run.answer: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/pub/run.bend as Run Lines 38-62 of ezx@1.11.0.0/src/pub/run.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/pub/run.bend&start_line=38&end_line=62 import Base import snap@1.4.0.0/main.bend as R import ezx@1.11.0.0/src/io/file.bend as F import ezx@1.11.0.0/src/tool/run.bend as ToolRun import ezx@1.11.0.0/src/tool/world.bend as TW import ezx@1.11.0.0/src/hub/get.bend as Net import ezx@1.11.0.0/src/share/env.bend as Env import ezx@1.11.0.0/src/pub/world.bend as PW import ezx@1.11.0.0/src/pub/plan.bend as PP import ezx@1.11.0.0/src/ws/run.bend as WsRun # one question, answered def answer(+lib: String, ask: PW.Ask) -> IO(PW.Answer): match ask: case PW.Tool{q}: do IO: a : TW.Answer <- ToolRun.answer(q) return PW.Told{a} case PW.Tracked{}: do IO: +out : String <- R.exec(["git", "-c", "core.quotePath=false", "ls-files", "-v"]) return ran(out) case PW.Upload{+entry, +named, says}: do IO: IO.print_err(says) +out : String <- R.exec(Env.line(lib, PP.upload.line(entry, named))) return ran(out) case PW.Lock{}: do IO: at : String <- WsRun.lock.path() m : Maybe<&2, String> <- F.read(at) return PW.Told{TW.Plain{m}} case PW.Hub{+url}: do IO: +out : String <- Net.get(url) return ran(out) Uses (19): 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.print_err 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=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/hub/get.bend&name=get https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/io/file.bend&name=read https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pub/plan.bend&name=upload.line https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pub/run.bend&name=ran https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pub/world.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/pub/world.bend&name=Ask https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/share/env.bend&name=line https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/tool/run.bend&name=answer https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/tool/world.bend&name=Answer https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/ws/run.bend&name=lock.path https://jend.leeeet.dev/definition.txt?path=snap@1.4.0.0/main.bend&name=exec