/list

Usage:

/LIST [-s] [macro-options] [name] [= body]


Lists macros having all the specified options. Except for "-s", each option is compared against a macro's option, and the macro selected only if the options match. Omitted options are "don't care", and will not be used in the comparison. Thus, with no arguments, /list will list all non-invisible macros.

Options:

-s
List macros in short format. Must be first option.
-mmatching
Determines matching style used for comparison of string fields (trigger, binding, hook, worldtype, name, and body). This is NOT compared against the -m options of other macros. If omitted, the style is determined by %{matching}.
-tpattern
Matches macros with triggers matching pattern. "-t" with no pattern matches all non-empty triggers; a "{}" glob pattern or "^$" regexp can be used to match empty triggers (i.e., no trigger).
-bpattern
Matches macros with bindings matching pattern. "-b" with no pattern matches all non-empty bindings; a "{}" glob pattern or "^$" regexp can be used to match empty bindings (i.e., no binding).
-hpattern
Matches macros with hooks matching pattern. "-h" by itself matches all non-empty hooks; "-h0" matches only macros without hooks.
-aattrs
Matches macros having one or more of the display attributes in attrs.
-i
Matches invisible macros as well as normal macros.
-I
Matches only invisible macros.
name
A pattern that macro names must match. The glob pattern "{}" or regexp "^$" will match only macros without names.
= body
body is a pattern that macro bodies must match. The glob pattern "{}", or the regexp "^$" or the simple pattern "" will match bodyless macros only.

The -p, -c, -F, and -n options are strightforward comparisons.

The return value of /list is the number of the last macro listed, or 0 if no macros were listed (because of error or none matched the specified options).

The standard library also defines the macros /listbind, /listdef, /listgag, /listhilite, /listfullhilite, /listpartial, /listhook, and /listtrig, which list macros of the appropriate type.

Example:

    /list -mregexp -n0 -t -aurfdh ^foo =
will list all macros whose names begin with "foo"; have a trigger; are not multi-shots; have any of the underline, reverse, flash, dim, or hilite attributes; and have an empty body.

See: macros, triggers, patterns, attributes, library, /def


Back to index
Back to tf home page
Copyright © 1995, 1996, 1997 Ken Keys