aboutsummaryrefslogtreecommitdiffstats
path: root/commands/prompt.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-10-17 00:14:49 +0200
committerRobin Jarry <robin@jarry.cc>2023-10-28 19:25:08 +0200
commit30851656591293ed2e19340ab78c937855a11143 (patch)
treef7c0aad888110163ebb21a9498784aea9f26f949 /commands/prompt.go
parent08ef572e08665ec3a06ea6ac315f3dd6d0eac5d1 (diff)
downloadaerc-30851656591293ed2e19340ab78c937855a11143.tar.gz
commands: remove command set completion api
Do not expose the completion of a command via its command set. Instead, require a single command object to be resolved in order to execute it. Extract the command names and the template terms completions in main.go. 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 'commands/prompt.go')
-rw-r--r--commands/prompt.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/prompt.go b/commands/prompt.go
index d42a6597..dd259c30 100644
--- a/commands/prompt.go
+++ b/commands/prompt.go
@@ -40,7 +40,7 @@ func (Prompt) Complete(args []string) []string {
if hascommand {
return nil
}
- cs, _ = GlobalCommands.GetCompletions(args[1])
+ cs = GlobalCommands.Names()
}
if cs == nil {
return nil