aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aerc.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/aerc.go b/aerc.go
index bfd12b58..5ba9faba 100644
--- a/aerc.go
+++ b/aerc.go
@@ -74,15 +74,9 @@ func execCommand(aerc *widgets.Aerc, ui *libui.UI, cmd []string) error {
}
func getCompletions(aerc *widgets.Aerc, cmd string) []string {
- cmds := getCommands((*aerc).SelectedTab())
- completions := make([]string, 0)
- for _, set := range cmds {
- opts := set.GetCompletions(aerc, cmd)
- if len(opts) > 0 {
- for _, opt := range opts {
- completions = append(completions, opt)
- }
- }
+ var completions []string
+ for _, set := range getCommands((*aerc).SelectedTab()) {
+ completions = append(completions, set.GetCompletions(aerc, cmd)...)
}
return completions
}