aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.go b/main.go
index b72bf713..8ac70cf9 100644
--- a/main.go
+++ b/main.go
@@ -105,6 +105,10 @@ func execCommand(
cmdline string,
acct *config.AccountConfig, msg *models.MessageInfo,
) error {
+ cmdline, err := commands.ExpandTemplates(cmdline, acct, msg)
+ if err != nil {
+ return err
+ }
name, rest, didCut := strings.Cut(cmdline, " ")
cmds := getCommands(app.SelectedTabContent())
cmdline = expandAbbreviations(name, cmds)
@@ -112,7 +116,7 @@ func execCommand(
cmdline += " " + rest
}
for i, set := range cmds {
- err := set.ExecuteCommand(cmdline, acct, msg)
+ err := set.ExecuteCommand(cmdline)
if err != nil {
if errors.As(err, new(commands.NoSuchCommand)) {
if i == len(cmds)-1 {