aboutsummaryrefslogtreecommitdiffstats
path: root/commands/patch
diff options
context:
space:
mode:
Diffstat (limited to 'commands/patch')
-rw-r--r--commands/patch/find.go2
-rw-r--r--commands/patch/list.go2
-rw-r--r--commands/patch/patch.go8
3 files changed, 8 insertions, 4 deletions
diff --git a/commands/patch/find.go b/commands/patch/find.go
index a508551d..10b96ef2 100644
--- a/commands/patch/find.go
+++ b/commands/patch/find.go
@@ -11,7 +11,7 @@ import (
"git.sr.ht/~rjarry/aerc/commands/account"
"git.sr.ht/~rjarry/aerc/lib/pama"
"git.sr.ht/~rjarry/aerc/lib/pama/models"
- "git.sr.ht/~rjarry/go-opt"
+ "git.sr.ht/~rjarry/go-opt/v2"
)
type Find struct {
diff --git a/commands/patch/list.go b/commands/patch/list.go
index 0451605b..b05a9bf3 100644
--- a/commands/patch/list.go
+++ b/commands/patch/list.go
@@ -13,7 +13,7 @@ import (
"git.sr.ht/~rjarry/aerc/lib/pama"
"git.sr.ht/~rjarry/aerc/lib/pama/models"
"git.sr.ht/~rjarry/aerc/lib/ui"
- "git.sr.ht/~rjarry/go-opt"
+ "git.sr.ht/~rjarry/go-opt/v2"
"git.sr.ht/~rockorager/vaxis"
)
diff --git a/commands/patch/patch.go b/commands/patch/patch.go
index 25d7850a..15fb35f4 100644
--- a/commands/patch/patch.go
+++ b/commands/patch/patch.go
@@ -5,7 +5,7 @@ import (
"fmt"
"git.sr.ht/~rjarry/aerc/commands"
- "git.sr.ht/~rjarry/go-opt"
+ "git.sr.ht/~rjarry/go-opt/v2"
)
var subCommands map[string]commands.Command
@@ -68,7 +68,11 @@ func (p *Patch) CompleteSubArgs(arg string) []string {
}
// prepend arbitrary string to arg to work with sub-commands
options, _ := commands.GetCompletions(p.SubCmd, opt.LexArgs("a "+arg))
- return options
+ completions := make([]string, 0, len(options))
+ for _, o := range options {
+ completions = append(completions, o.Value)
+ }
+ return completions
}
func (p Patch) Execute(args []string) error {