Documentation

#SUBSTITUTE

SUBSTITUTE

Syntax: #SU string newstring

This command is used in conjunction with triggers to change the text matched by the last trigger pattern to string. It is useful for removing clutter on the screen. You can also use this command to directly create the substitute trigger. Substituted strings are not processed by further triggers.

SUBSTITUTE example

#TRIGGER {(*) tells you,} {#SUB {%1:}}
Replaces all lines received from the server of the form xxx tells you, with the text xxx: . This saves room on the screen and is especially useful in a subwindow that captures text matching a pattern.
#SUB Zugg TeSSH-Guru
Substitutes any occurrence of the string "Zugg" with the new string "TeSSH-Guru". This is the same as the #TRIGGER {Zugg} {TeSSH-Guru} command.
#SUB {lt(%w)} {%lower(%1)}
This tricky command creates a trigger that substitutes the text "lt" followed by any word with the lowercase version of the word. For example, the string "ltZUGG" would be replaced with "zugg". This shows how to use wildcards and variables with the substitute command which makes it very powerful.

Add comment

Login or register to post comments