From 3622f7a99e91bfe38eab9e91dc982aafa00fe211 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Fri, 22 Dec 2023 15:51:14 +0100 Subject: cd: fix completion of folders with a space Folders that contain spaces are surrounded by quotes. They can never end with '/'. Hence they are never returned in the completion results. Update CompletePath with an additional onlyDirs argument to take care of this before quotes are inserted. Fixes: abe228b14d97 ("commands: use completion from go-opt") Fixes: https://todo.sr.ht/~rjarry/aerc/204 Reported-by: Bence Ferdinandy Signed-off-by: Robin Jarry Tested-by: Bence Ferdinandy --- commands/compose/attach.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'commands/compose/attach.go') diff --git a/commands/compose/attach.go b/commands/compose/attach.go index 49d63bb8..52ce55cb 100644 --- a/commands/compose/attach.go +++ b/commands/compose/attach.go @@ -36,7 +36,7 @@ func (Attach) Aliases() []string { } func (*Attach) CompletePath(arg string) []string { - return commands.CompletePath(arg) + return commands.CompletePath(arg, false) } func (a Attach) Execute(args []string) error { -- cgit