Setcmd.run: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/setcmd.bend as Setcmd Lines 278-291 of cswap-bend-cli@0.1.0.0/setcmd.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/setcmd.bend&start_line=278&end_line=291 import Base import cswap-bend-cli@0.1.0.0/setload.bend as Setload import cswap-bend-cli@0.1.0.0/cmd.bend as Cmd def run(+root: String, p: Plan, json: Bool) -> IO(Cmd.Out): match p: case PList{}: run.list(root, json) case PGet{key}: run.get(root, key, json) case PSet{key, value}: run.set(root, key, value) case PUnset{key}: run.unset(root, key) case PPath{}: IO.pure(Cmd.Out, Cmd.ok(Setload.path(root))) case PBad{msg}: IO.pure(Cmd.Out, Cmd.Out{2, "", "cswap config: error: " ++ msg ++ "\n"}) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/cmd.bend&name=Out https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/cmd.bend&name=ok https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setcmd.bend&name=Plan https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setcmd.bend&name=run.get https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setcmd.bend&name=run.list https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setcmd.bend&name=run.set https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setcmd.bend&name=run.unset https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setload.bend&name=path