/edit

Usage:

/EDIT [options] [name] [= body]


Edits a currently existing macro or the trigger associated with a macro. Options are described under "def". The name of the macro must be specified and cannot be changed, with the following two exceptions:

1. The macro name can be specified as "#num" where num is the number of the macro instead of the name. A macro number can be determined by listing the macro with /list, or from the return value of /def or /edit.

2. The macro name can be specified as "$pattern" where pattern is the trigger pattern. You may still change the pattern if this is used to locate the macro.

In either case, the name cannot be changed. It is possible to create a macro which changes the name of a macro, if it does not have any options other than a name and a body:

/def rename = /def %2 = $%1%; /undef %1

How this works is discussed in the help section "expansion".

Also, the /edmac command will allow you to edit an existing macro definition on the command line.

The -i flag will be cleared automatically from the macro if it is not explicitly given to /edit. The body may be cleared by specifiying "=" with nothing after it; if "=" is not present at all, the macro's body will be unchanged. It is not possible to clear the -F option. The -w, -T -t, and -h options also can not be cleared, but their arguments can be changed. The -T, -t, and -h options will use the pattern matching style specified by the -m option to the /edit command; they will not inherit -m from the original definition. Any other options that are not specified with /edit will remain unchanged from the original definition.

Example:

/def -p2 -t"* has arrived." -ah greet = :greets %1
/edit -c0 greet

The second command will change the probability of /greet's trigger from 100% to 0%, effectively turning it off without actually undefining it.

See: macros, triggers, patterns, evaluation, attributes, /def, /list, /edmac


Back to index
Back to tf home page
Copyright © 1995 - 1999 Ken Keys