Posted to tcl by stu at Tue Aug 09 18:07:46 GMT 2022view raw
- return -code {*}[expr {
- $subcommand eq "list"
- ? [llength $args] == 0
- ? [list ok [dict keys $pkgconfig]]
- : [list error "wrong # args: should be \"[namespace current]::pkgconfig list\""]
- : $subcommand eq "get"
- ? [llength $args] == 1
- ? [dict exists $pkgconfig [set key [lindex $args 0]]]
- ? [list ok [dict get $pkgconfig $key]]
- : [list error "key \"$key\" not known"]
- : [list error "wrong # args: should be \"[namespace current]::pkgconfig get key\""]
- : [list uh oh]
- }]