Please enable JavaScript to view this site.

Navigation: Take Command

Regular Expression Triggers

Scroll Prev Top Next More

Take Command can evaluate user-defined regular expressions whenever terminal output completes a row. Configure triggers from the tab command Triggers. The triggers only match command output that is displayed in tab windows, not the optional command input window.

 

Each trigger has a name, regular-expression pattern, enabled state, and optional case-sensitive matching. The following actions are available:

 

•Highlight: Colors the matching range in the completed terminal row.

•Send text: Writes the action parameter to the active pseudo-console.

•Show notification: Displays the action parameter in a desktop notification.

•Bell: Runs the configured terminal bell behavior.

•Run command: Executes the action parameter as a TCC command, batch file, script, or executable. Note that this will run in the Take Command context, not that of the tab window. So the current directory, environment, etc. may be different.

 

Triggers are stored in the TCMD.INI file. The TerminalTriggers section contains the trigger count; each TerminalTrigger<n> section contains Name, Pattern, Parameter, Enabled, MatchCase, "FirstMatchOnly", "and Action. Highlight triggers also support HighlightColor as a Windows COLORREF value.

 

Regular expressions use the Take Command configured syntax. Invalid patterns do not interrupt terminal output; they simply do not produce a match.