/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.
- -S
- Sort macros by name.
- -mmatching
- Determines matching style used for comparison of string fields
(trigger, keybinding, keyname,
hook, worldtype, name, and
body). This is not compared against the -m options of
macros. If omitted, the style
is determined by
%{matching}.
- -tpattern
- -bpattern
- -Bpattern
- -Epattern
- -Tpattern
- Matches macros with
a corresponding /def option
whose option-argument matches pattern.
pattern. An option with no pattern matches all
macros that have that option,
regardless of the value of the option-argument.
A "{}" glob pattern or
"^$" regexp
can be used to match
macros that don't
have that option,
- -h["event[ pattern]"]
- Matches macros with
hooks matching event
and 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.
- -Ppartattrs
- Matches macros having a
-Ppart
with 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.
If name starts with "#", it is compared against macro
numbers, instead of as a pattern against macro 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.
Other options allowed by /def may
be used with /list, and are compared
directly to macros.
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 -aurh ^foo =
will list all macros whose names begin
with "foo"; have a trigger; are not
multi-shots; have any of the underline, reverse, or
hilite
attributes; and have an empty body.
To list functions for named keys, try
"/list -i key_*
".
See: macros,
triggers,
patterns,
attributes,
library,
/def
Back to index
Back to tf home page
Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys