diff options
author | Galen Abell <galen@galenabell.com> | 2019-07-30 15:10:58 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-08-02 09:22:40 -0400 |
commit | bfefafff27b126c485054c4d357e095ea2bd1147 (patch) | |
tree | ef8e6f34c21011206cf87aacdb2d65b731832cf9 /commands/compose | |
parent | c4b57aaad8a48a1347a0404001fdcb13532c7620 (diff) | |
download | aerc-bfefafff27b126c485054c4d357e095ea2bd1147.zip |
Add filesystem completions for :attach and :cd
Tab-completions now cycle through filesystem paths when using :attach or
:cd commands.
Diffstat (limited to 'commands/compose')
-rw-r--r-- | commands/compose/attach.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/commands/compose/attach.go b/commands/compose/attach.go index 43aa32d..7501a33 100644 --- a/commands/compose/attach.go +++ b/commands/compose/attach.go @@ -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 { |