Cli.fault_message: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 5783-5823 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=5783&end_line=5823 import Base def fault_message(fault: ScanFault, path: String, items: List<&2, Item>) -> List<&2, Segment>: match fault: case E01{token}: List.concat(&2, Segment, [[plain("unexpected argument ")], quoted(token, [Yellow{}]), [plain(" found")]]) case E02{name}: plain("unrecognized subcommand ") <> quoted(name, [Yellow{}]) case E03{arg}: [plain(String.concat(["a value is required for '", arg, "' but none was supplied"]))] case E04{arg, value, reason}: List.concat(&2, Segment, [[plain("invalid value ")], quoted(value, [Yellow{}]), [plain(String.concat([" for '", arg, "': ", reason]))]]) case E05{arg, value}: List.concat(&2, Segment, [[plain("unexpected value ")], quoted(value, [Yellow{}]), [plain(String.concat([" for '", arg, "' found; no more were expected"]))]]) case E06{missing}: [plain(String.append( "the following required arguments were not provided:", missing_lines(missing)))] case E07{a, b}: [plain(String.concat(["the argument '", a, "' cannot be used with '", b, "'"]))] case E08{a, b}: [plain(String.concat(["the argument '", a, "' requires '", b, "'"]))] case E09{token}: List.concat(&2, Segment, [[plain("unexpected argument ")], quoted(token, [Yellow{}]), [plain(" found")]]) case E10{}: [plain(String.concat(["'", path, "' requires a subcommand but none was provided\n [subcommands: ", String.join(visible_subs(items), ", "), "]"]))] case E11{arg, value, name, reason}: List.concat(&2, Segment, [[plain("invalid value ")], quoted(value, [Yellow{}]), [plain(String.concat([" for '", arg, "' from environment variable ", name, ": ", reason]))]]) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.concat 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=Base/base.bend&name=String.concat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.join https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Item https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=ScanFault https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Segment https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=Style https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=missing_lines https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=plain https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=quoted https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=visible_subs