Implement basic tab completion support
Tab completion currently only works on commands. Contextual completion will be added in the future.
This commit is contained in:
parent
177651bdda
commit
2a0961701c
47 changed files with 598 additions and 154 deletions
commands/account
|
@ -6,12 +6,21 @@ import (
|
|||
"git.sr.ht/~sircmpwn/aerc/widgets"
|
||||
)
|
||||
|
||||
type ViewMessage struct{}
|
||||
|
||||
func init() {
|
||||
register("view", ViewMessage)
|
||||
register("view-message", ViewMessage)
|
||||
register(ViewMessage{})
|
||||
}
|
||||
|
||||
func ViewMessage(aerc *widgets.Aerc, args []string) error {
|
||||
func (_ ViewMessage) Aliases() []string {
|
||||
return []string{"view-message", "view"}
|
||||
}
|
||||
|
||||
func (_ ViewMessage) Complete(aerc *widgets.Aerc, args []string) []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ ViewMessage) Execute(aerc *widgets.Aerc, args []string) error {
|
||||
if len(args) != 1 {
|
||||
return errors.New("Usage: view-message")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue