Table of Contents
Create an alias
An alias matches a command you type and replaces it with another command or script. This example makes k goblin send kill goblin.
Build the alias
- Open a profile, connected or offline.
- Open Automations and choose Create alias.
- Set Name to
kill-shortcut. - Set Pattern to
^k (.+)$. - In Test against a command, enter
k goblin. The tester should report a match. - Leave Behavior on Send as text.
- In Script, enter
kill $1. - Choose Create alias.
Return to the session, type k goblin, and press Enter. Smudgy sends kill goblin.
What the pattern means
The Pattern field uses a regular expression.
^means the start of the command.kmatches those literal characters, including the space.(.+)captures one or more characters.$means the end of the command.
The action's $1 is replaced by the first captured group. Named groups also work: ^k (?<target>.+)$ can send kill $target. Use $$ when the action needs a literal dollar sign.
Anchoring the pattern matters. A pattern of only k could also match unrelated input containing that letter.
Send more than one command
Use the command separator in a text action:
stand;get sword;wield sword
These commands re-enter the normal outgoing pipeline in order, so another alias can match one of them. Keep chains short enough to understand when a later alias changes the result.

