Add filesystem completions for :attach and :cd
Tab-completions now cycle through filesystem paths when using :attach or :cd commands.
This commit is contained in:
parent
c4b57aaad8
commit
bfefafff27
2 changed files with 24 additions and 2 deletions
commands/compose
|
@ -5,6 +5,7 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"git.sr.ht/~sircmpwn/aerc/commands"
|
||||
"git.sr.ht/~sircmpwn/aerc/widgets"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/mitchellh/go-homedir"
|
||||
|
@ -21,7 +22,12 @@ func (_ Attach) Aliases() []string {
|
|||
}
|
||||
|
||||
func (_ Attach) Complete(aerc *widgets.Aerc, args []string) []string {
|
||||
return nil
|
||||
path := ""
|
||||
if len(args) >= 1 {
|
||||
path = args[0]
|
||||
}
|
||||
|
||||
return commands.CompletePath(path)
|
||||
}
|
||||
|
||||
func (_ Attach) Execute(aerc *widgets.Aerc, args []string) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue