An attribute name on its own is a request to print the current
value of that attribute. An assignment ATTR=VALUE makes ATTR
- have the requested VALUE.
+ have the requested VALUE. When requesting attributes, you can
+ instead give a pattern containing `*' and `?' metacharacters
+ (matching zero or more, or exactly one character) -- all
+ matching attributes are printed.
The attributes, their meanings, and the acceptable values are as
follows:
unrewarding) or pirates (risky and tedious), and start trading
food and other cheap items.
-$Id: README,v 1.7 2003/03/07 00:47:13 mdw Exp $
+$Id: README,v 1.8 2003/03/09 17:59:48 mdw Exp $
\f
Local variables:
mode: text
exit 1
}
}
- "^[a-z][a-z-]*$" {
- if {![info exists attr($a)]} {
- puts stderr "$argv0: no such attribute `$a'"
- exit 1
- }
- puts [format "%-20s %s" $a [eval \
- get/[lindex $attr($a) 0] [lrange $attr($a) 1 end] [list $a]]]
- set acted 1
- }
default {
- if {[catch { elite-unpackcmdr cmdr [read-file $a] } err]} {
- puts stderr "$argv0: couldn't read `$a': $err"
- exit 1
+ set n 0
+ foreach aa $attrs {
+ if {[string match $a $aa]} {
+ incr n
+ puts [format "%-20s %s" $aa [eval \
+ get/[lindex $attr($aa) 0] \
+ [lrange $attr($aa) 1 end] [list $aa]]]
+ }
+ }
+ if {$n} {
+ set acted 1
+ } else {
+ if {[catch { elite-unpackcmdr cmdr [read-file $a] } err]} {
+ puts stderr "$argv0: couldn't read `$a': $err"
+ exit 1
+ }
}
}
}