Args.common_errs: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/args.bend as Args Lines 174-191 of cswap-bend-cli@0.1.0.0/args.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/args.bend&start_line=174&end_line=191 import Base def common_errs(+vb: String, +os: List<&2, Opt>) -> List<&2, String>: [err_if(opt.has("--token-status", os) && Bool.not(String.eq(vb, "list")), "--token-status can only be used with 'list'"), err_if(opt.has("--json", os) && Bool.not(has_str(vb, ["list", "status", "switch"])), "--json can only be used with 'list', 'status', or 'switch'"), err_if(opt.has("--json", os) && opt.has("--token-status", os), "--token-status cannot be combined with --json"), err_if(opt.has("--strategy", os) && Bool.not(String.eq(vb, "switch")), "--strategy can only be used with bare 'switch'"), err_if(opt.has("--model", os) && Bool.not(opt.has("--strategy", os)), "--model can only be used with 'switch --strategy best' or 'switch --strategy next-available'"), err_if(opt.has("--slot", os) && Bool.not(has_str(vb, ["add", "add-token"])), "--slot can only be used with 'add' or 'add-token'"), err_if(opt.has("--email", os) && Bool.not(String.eq(vb, "add-token")), "--email can only be used with 'add-token'"), err_if(opt.has("--account", os) && Bool.not(String.eq(vb, "export")), "--account can only be used with 'export'"), err_if(opt.has("--alias", os) && Bool.not(String.eq(vb, "add")), "--alias can only be used with 'add'"), err_if(opt.has("--force", os) && Bool.not(has_str(vb, ["import", "switch"])), "--force can only be used with 'import' or 'switch '"), err_if(opt.has("--full", os) && Bool.not(String.eq(vb, "export")), "--full can only be used with 'export'"), err_if(opt.has("--hold", os) && Bool.not(String.eq(vb, "import-usage")), "--hold can only be used with 'import-usage'"), err_if(opt.has("--strategy", os) && String.eq(vb, "switch") && Bool.not(List.is_empty(&2, String, positionals(os))), "--strategy can only be used with bare 'switch'"), err_if(opt.has("--force", os) && String.eq(vb, "switch") && List.is_empty(&2, String, positionals(os)), "--force can only be used with 'import' or 'switch '"), strategy_err(opt.val("--strategy", os)), err_if((opt.has("--install-service", os) || opt.has("--uninstall-service", os) || opt.has("--service-status", os)) && Bool.not(String.eq(vb, "menubar")), "--install-service, --uninstall-service and --service-status can only be used with 'menubar'")] Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.is_empty https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/args.bend&name=Opt https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/args.bend&name=err_if https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/args.bend&name=has_str https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/args.bend&name=opt.has https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/args.bend&name=opt.val https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/args.bend&name=positionals https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/args.bend&name=strategy_err