Cli.opt_key: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 2742-2750 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=2742&end_line=2750 import Base # name as a key of info; only info's --no- long clears the flag, as in # option_matches. def opt_key(+name: String, info: ArgInfo) -> OptKey: match info: case ArgInfo{id, usage, short, +long, +kind, attrs}: OptKey{name, OptFound{ArgInfo{id, usage, short, long, kind, attrs}, Bool.not(Bool.and(kind_negatable(kind), Bool.and(Bool.not(String.is_empty(long)), String.eq(name, negated_long(long)))))}} Uses (10): 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=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.is_empty https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=ArgInfo https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=OptFound https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=OptKey https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=kind_negatable https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=negated_long