commands/repeat.go
raw| 1 | package commands |
| 2 | |
| 3 | import ( |
| 4 | "git.sr.ht/~rjarry/aerc/app" |
| 5 | ) |
| 6 | |
| 7 | type Repeat struct{} |
| 8 | |
| 9 | func init() { |
| 10 | Register(Repeat{}) |
| 11 | } |
| 12 | |
| 13 | func (Repeat) Description() string { |
| 14 | return "Repeat aerc's last executed command." |
| 15 | } |
| 16 | |
| 17 | func (Repeat) Context() CommandContext { |
| 18 | return GLOBAL |
| 19 | } |
| 20 | |
| 21 | func (Repeat) Aliases() []string { |
| 22 | return []string{"repeat"} |
| 23 | } |
| 24 | |
| 25 | func (Repeat) Execute(args []string) error { |
| 26 | return app.ExecuteLastCommand() |
| 27 | } |