batch
This directory provides voice programming support for the Windows Batch scripting language (commonly used in .bat and .cmd files). It defines context-aware voice commands and behavior modifications tailored to the syntax of batch scripting.
How It Works
The files in this directory work in tandem to configure Talon's behavior when a Batch file is active:
- batch.talon activates commands specific to Batch script syntax when the active language is detected as
batch. It exposes voice commands for common operations such as script termination ("soft exit", "hard exit"), printing output ("echo off"), calling functions or outer shells ("call shell"), checking error levels ("if error"), and handling command-line arguments ("arg <number>"). Additionally, it enables theuser.code_comment_linetag. - batch.py provides the Python backend implementation for context-specific actions. When the Batch language is active, it overrides the
code_comment_line_prefixaction to use a snippet namedcommentLine, ensuring that code commenting commands generate the correct syntax for Batch files.