diff options
Diffstat (limited to 'commands/compose/detach.go')
-rw-r--r-- | commands/compose/detach.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/commands/compose/detach.go b/commands/compose/detach.go index a2996516..91cf2a58 100644 --- a/commands/compose/detach.go +++ b/commands/compose/detach.go @@ -4,10 +4,11 @@ import ( "fmt" "git.sr.ht/~rjarry/aerc/app" + "git.sr.ht/~rjarry/aerc/commands" ) type Detach struct { - Path string `opt:"path" required:"false"` + Path string `opt:"path" required:"false" complete:"CompletePath"` } func init() { @@ -18,9 +19,9 @@ func (Detach) Aliases() []string { return []string{"detach"} } -func (Detach) Complete(args []string) []string { +func (*Detach) CompletePath(arg string) []string { composer, _ := app.SelectedTabContent().(*app.Composer) - return composer.GetAttachments() + return commands.CompletionFromList(composer.GetAttachments(), arg) } func (d Detach) Execute(args []string) error { |