aboutsummaryrefslogtreecommitdiffstats
path: root/app/msgviewer.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-10-18 10:24:36 +0200
committerRobin Jarry <robin@jarry.cc>2023-10-28 19:25:13 +0200
commit3f3f5929519195ad018b50733820ac88edc5373a (patch)
tree47be83c8a3854e87c579ed20c37e90f104a39031 /app/msgviewer.go
parentabe228b14d97d8d47e8ff4406de387fac45cfe68 (diff)
downloadaerc-3f3f5929519195ad018b50733820ac88edc5373a.tar.gz
treewide: replace shlex.Split with opt.SplitArgs
Replace the remaining shlex.Split calls with opt.SplitArgs. Remove dependency to shlex. Signed-off-by: Robin Jarry <robin@jarry.cc> Reviewed-by: Koni Marti <koni.marti@gmail.com> Tested-by: Moritz Poldrack <moritz@poldrack.dev> Tested-by: Inwit <inwit@sindominio.net>
Diffstat (limited to 'app/msgviewer.go')
-rw-r--r--app/msgviewer.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/msgviewer.go b/app/msgviewer.go
index 8ac22bcc..abed93fd 100644
--- a/app/msgviewer.go
+++ b/app/msgviewer.go
@@ -13,7 +13,6 @@ import (
"github.com/danwakefield/fnmatch"
"github.com/emersion/go-message/textproto"
"github.com/gdamore/tcell/v2"
- "github.com/google/shlex"
"github.com/mattn/go-runewidth"
"git.sr.ht/~rjarry/aerc/config"
@@ -24,6 +23,7 @@ import (
"git.sr.ht/~rjarry/aerc/lib/ui"
"git.sr.ht/~rjarry/aerc/log"
"git.sr.ht/~rjarry/aerc/models"
+ "git.sr.ht/~rjarry/go-opt"
)
var _ ProvidesMessages = (*MessageViewer)(nil)
@@ -431,11 +431,7 @@ func NewPartViewer(
acct.PushError(fmt.Errorf("could not start pager: %w", err))
return nil, err
}
- cmd, err := shlex.Split(pagerCmd)
- if err != nil {
- return nil, err
- }
-
+ cmd := opt.SplitArgs(pagerCmd)
pager = exec.Command(cmd[0], cmd[1:]...)
info := msg.MessageInfo()