aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/aerc.1.scd9
-rw-r--r--lib/ipc/receive.go7
2 files changed, 14 insertions, 2 deletions
diff --git a/doc/aerc.1.scd b/doc/aerc.1.scd
index e4a3305f..91e75d60 100644
--- a/doc/aerc.1.scd
+++ b/doc/aerc.1.scd
@@ -66,6 +66,15 @@ from your terminal.
Run an aerc-internal command as you would in Ex-Mode. See *RUNTIME
COMMANDS* below.
+ The command to be executed and its arguments can either be passed as
+ separate arguments in the shell (e.g., _aerc :cmd arg1 arg2_) or as a single
+ argument in the shell (e.g., _aerc ":cmd arg1 arg2"_). In the former case,
+ aerc may add quotes to the command before it is parsed in an attempt to
+ preserve arguments containing spaces and other special characters. In the
+ latter case, aerc will parse the command verbatim, as if it had been typed
+ directly on aerc's command line. This latter form can be helpful for
+ commands that don't interpret quotes in their arguments.
+
*mbox:*_<file>_
Open the specified mbox file as a virtual temporary account.
diff --git a/lib/ipc/receive.go b/lib/ipc/receive.go
index e2fffaf0..79618f50 100644
--- a/lib/ipc/receive.go
+++ b/lib/ipc/receive.go
@@ -128,8 +128,11 @@ func (as *AercServer) handleMessage(req *Request) *Response {
Error: "command rejected: IPC is disabled",
}
}
- cmdline := opt.QuoteArgs(req.Arguments...)
- err = as.handler.Command(cmdline.String())
+ cmdline := req.Arguments[0]
+ if len(req.Arguments) > 1 {
+ cmdline = opt.QuoteArgs(req.Arguments...).String()
+ }
+ err = as.handler.Command(cmdline)
if err != nil {
return &Response{Error: err.Error()}
}