aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ipc/receive.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ipc/receive.go')
-rw-r--r--lib/ipc/receive.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ipc/receive.go b/lib/ipc/receive.go
index 29ed0808..47ffa89f 100644
--- a/lib/ipc/receive.go
+++ b/lib/ipc/receive.go
@@ -10,6 +10,8 @@ import (
"sync/atomic"
"time"
+ "git.sr.ht/~rjarry/go-opt"
+
"git.sr.ht/~rjarry/aerc/config"
"git.sr.ht/~rjarry/aerc/lib/xdg"
"git.sr.ht/~rjarry/aerc/log"
@@ -122,9 +124,8 @@ func (as *AercServer) handleMessage(req *Request) *Response {
Error: "command rejected: IPC is disabled",
}
}
-
- req.Arguments[0] = strings.TrimPrefix(req.Arguments[0], ":")
- err := as.handler.Command(req.Arguments)
+ cmdline := opt.QuoteArgs(req.Arguments...)
+ err = as.handler.Command(cmdline.String())
if err != nil {
return &Response{Error: err.Error()}
}