aboutsummaryrefslogtreecommitdiffstats
path: root/commands/patch/patch.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/patch/patch.go')
-rw-r--r--commands/patch/patch.go8
1 files changed, 6 insertions, 2 deletions
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 {