aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorJason Cox <me@jasoncarloscox.com>2024-02-22 20:25:22 -0500
committerRobin Jarry <robin@jarry.cc>2024-04-13 21:46:47 +0200
commit771e676953c54aa6c818020687b53470ec5597f3 (patch)
treec8c9d308efaacc5691af699f904fc05c56815d7f /main.go
parent480637d9ed8cf979f4be377cb37fdd14b60ceef3 (diff)
downloadaerc-771e676953c54aa6c818020687b53470ec5597f3.tar.gz
ipc: add more fine-grained options to disable IPC
Add disable-ipc-mailto and disable-ipc-mbox to make mailto:... and mbox:... commands always run in a new instance, while still allowing aerc-internal commands (i.e., aerc :<command...>) to run over IPC. Changelog-added: Add config options `disable-ipc-mailto` and `disable-ipc-mbox` to make `mailto:...` and `mbox:...` commands always run in a new aerc instance. Signed-off-by: Jason Cox <me@jasoncarloscox.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.go b/main.go
index b7437fbd..21805345 100644
--- a/main.go
+++ b/main.go
@@ -171,7 +171,10 @@ func main() {
noIPC := opts.NoIPC || config.General.DisableIPC
- if len(opts.Command) > 0 && !noIPC {
+ if len(opts.Command) > 0 && !noIPC &&
+ !(config.General.DisableIPCMailto && strings.HasPrefix(opts.Command[0], "mailto:")) &&
+ !(config.General.DisableIPCMbox && strings.HasPrefix(opts.Command[0], "mbox:")) {
+
response, err := ipc.ConnectAndExec(opts.Command)
if err == nil {
if response.Error != "" {