Quick Start
A trigger is an action that is automatically executed when the output received from a server matches specified text or regular expressions. Triggers help automate and streamline workflows in the terminal, increasing efficiency and reducing the need for manual intervention.
WindTerm
supports the following trigger types:
WindTerm
also has the following built-in triggers to provide convenient functionality:
Regular Expression
WindTerm
supports using named capturing in the matching regular expression patterns, and captured groups can be referenced when generating the return value. For example, a Run Command
trigger can be used to launch vi
with the filename and line number based on a regular expression that includes two named groups:
Output |
File “test.py”, line 5, in <module> |
Regex |
File “(?<file>\S+)”.*line (?<line>\d+) |
Command |
vi ${file} +${line}\n |
Javascript
The trigger types such as Open Hyperlink
, Send Text
, and Show Tooltip
support using JavaScript to generate return values. The available JavaScript objects and functions can be referenced from:
List of JavaScript Objects and Functions