diff options
author | Jason Cox <me@jasoncarloscox.com> | 2024-02-22 20:25:22 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-04-13 21:46:47 +0200 |
commit | 771e676953c54aa6c818020687b53470ec5597f3 (patch) | |
tree | c8c9d308efaacc5691af699f904fc05c56815d7f /main.go | |
parent | 480637d9ed8cf979f4be377cb37fdd14b60ceef3 (diff) | |
download | aerc-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.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 != "" { |