Remove duration from the status methods

We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
This commit is contained in:
Reto Brunner 2020-05-27 07:52:13 +02:00
parent 0f78f06610
commit f06d683688
29 changed files with 74 additions and 104 deletions

View File

@ -3,7 +3,6 @@ package account
import (
"errors"
"strings"
"time"
"git.sr.ht/~sircmpwn/aerc/widgets"
"git.sr.ht/~sircmpwn/aerc/worker/types"
@ -37,10 +36,10 @@ func (MakeDir) Execute(aerc *widgets.Aerc, args []string) error {
}, func(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done:
aerc.PushStatus("Directory created.", 10*time.Second)
aerc.PushStatus("Directory created.")
acct.Directories().Select(name)
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
}
})
return nil

View File

@ -2,7 +2,6 @@ package account
import (
"errors"
"time"
"git.sr.ht/~sircmpwn/aerc/lib"
"git.sr.ht/~sircmpwn/aerc/widgets"
@ -42,7 +41,7 @@ func (ViewMessage) Execute(aerc *widgets.Aerc, args []string) error {
lib.NewMessageStoreView(msg, store, aerc.DecryptKeys,
func(view lib.MessageView, err error) {
if err != nil {
aerc.PushError(err.Error(), 10*time.Second)
aerc.PushError(err.Error())
return
}
viewer := widgets.NewMessageViewer(acct, aerc.Config(), view)

View File

@ -4,7 +4,6 @@ import (
"fmt"
"os"
"strings"
"time"
"git.sr.ht/~sircmpwn/aerc/commands"
"git.sr.ht/~sircmpwn/aerc/widgets"
@ -35,23 +34,23 @@ func (Attach) Execute(aerc *widgets.Aerc, args []string) error {
path, err := homedir.Expand(path)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
return err
}
pathinfo, err := os.Stat(path)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
return err
} else if pathinfo.IsDir() {
aerc.PushError("Attachment must be a file, not a directory", 10*time.Second)
aerc.PushError("Attachment must be a file, not a directory")
return nil
}
composer, _ := aerc.SelectedTab().(*widgets.Composer)
composer.AddAttachment(path)
aerc.PushSuccess(fmt.Sprintf("Attached %s", pathinfo.Name()), 10*time.Second)
aerc.PushSuccess(fmt.Sprintf("Attached %s", pathinfo.Name()))
return nil
}

View File

@ -3,7 +3,6 @@ package compose
import (
"fmt"
"strings"
"time"
"git.sr.ht/~sircmpwn/aerc/widgets"
)
@ -43,7 +42,7 @@ func (Detach) Execute(aerc *widgets.Aerc, args []string) error {
return err
}
aerc.PushSuccess(fmt.Sprintf("Detached %s", path), 10*time.Second)
aerc.PushSuccess(fmt.Sprintf("Detached %s", path))
return nil
}

View File

@ -63,7 +63,7 @@ func (Postpone) Execute(aerc *widgets.Aerc, args []string) error {
go func() {
errStr := <-errChan
if errStr != "" {
aerc.PushError(" "+errStr, 10*time.Second)
aerc.PushError(" " + errStr)
return
}
@ -71,7 +71,7 @@ func (Postpone) Execute(aerc *widgets.Aerc, args []string) error {
ctr := datacounter.NewWriterCounter(ioutil.Discard)
err = composer.WriteMessage(header, ctr)
if err != nil {
aerc.PushError(errors.Wrap(err, "WriteMessage").Error(), 10*time.Second)
aerc.PushError(errors.Wrap(err, "WriteMessage").Error())
composer.Close()
return
}
@ -86,11 +86,11 @@ func (Postpone) Execute(aerc *widgets.Aerc, args []string) error {
}, func(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done:
aerc.PushStatus("Message postponed.", 10*time.Second)
aerc.PushStatus("Message postponed.")
r.Close()
composer.Close()
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
r.Close()
composer.Close()
}

View File

@ -221,14 +221,14 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
}
go func() {
aerc.PushStatus("Sending...", 10*time.Second)
aerc.PushStatus("Sending...")
nbytes, err := sendAsync()
if err != nil {
aerc.SetError(" " + err.Error())
return
}
if config.CopyTo != "" {
aerc.PushStatus("Copying to "+config.CopyTo, 10*time.Second)
aerc.PushStatus("Copying to " + config.CopyTo)
worker := composer.Worker()
r, w := io.Pipe()
worker.PostAction(&types.AppendMessage{
@ -240,12 +240,12 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
}, func(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done:
aerc.PushStatus("Message sent.", 10*time.Second)
aerc.PushStatus("Message sent.")
r.Close()
composer.SetSent()
composer.Close()
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
r.Close()
composer.Close()
}
@ -254,7 +254,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
composer.WriteMessage(header, w)
w.Close()
} else {
aerc.PushStatus("Message sent.", 10*time.Second)
aerc.PushStatus("Message sent.")
composer.SetSent()
composer.Close()
}

View File

@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"os/exec"
"time"
"git.sr.ht/~sircmpwn/aerc/widgets"
)
@ -31,16 +30,16 @@ func (ExecCmd) Execute(aerc *widgets.Aerc, args []string) error {
go func() {
err := cmd.Run()
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
} else {
if cmd.ProcessState.ExitCode() != 0 {
aerc.PushError(fmt.Sprintf(
"%s: completed with status %d", args[0],
cmd.ProcessState.ExitCode()), 10*time.Second)
cmd.ProcessState.ExitCode()))
} else {
aerc.PushStatus(fmt.Sprintf(
"%s: completed with status %d", args[0],
cmd.ProcessState.ExitCode()), 10*time.Second)
cmd.ProcessState.ExitCode()))
}
}
}()

View File

@ -5,7 +5,6 @@ import (
"fmt"
"path"
"sync"
"time"
"git.sr.ht/~sircmpwn/aerc/commands"
"git.sr.ht/~sircmpwn/aerc/models"
@ -86,7 +85,7 @@ func (Archive) Execute(aerc *widgets.Aerc, args []string) error {
case *types.Done:
wg.Done()
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
success = false
wg.Done()
}
@ -96,7 +95,7 @@ func (Archive) Execute(aerc *widgets.Aerc, args []string) error {
go func() {
wg.Wait()
if success {
aerc.PushStatus("Messages archived.", 10*time.Second)
aerc.PushStatus("Messages archived.")
}
}()
return nil

View File

@ -3,7 +3,6 @@ package msg
import (
"errors"
"strings"
"time"
"git.sr.ht/~sircmpwn/getopt"
@ -58,9 +57,9 @@ func (Copy) Execute(aerc *widgets.Aerc, args []string) error {
switch msg := msg.(type) {
case *types.Done:
aerc.PushStatus("Messages copied.", 10*time.Second)
aerc.PushStatus("Messages copied.")
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
}
})
return nil

View File

@ -2,7 +2,6 @@ package msg
import (
"errors"
"time"
"git.sr.ht/~sircmpwn/aerc/lib"
"git.sr.ht/~sircmpwn/aerc/models"
@ -45,9 +44,9 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
store.Delete(uids, func(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done:
aerc.PushStatus("Messages deleted.", 10*time.Second)
aerc.PushStatus("Messages deleted.")
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
}
})
@ -68,7 +67,7 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
lib.NewMessageStoreView(next, store, aerc.DecryptKeys,
func(view lib.MessageView, err error) {
if err != nil {
aerc.PushError(err.Error(), 10*time.Second)
aerc.PushError(err.Error())
return
}
nextMv := widgets.NewMessageViewer(acct, aerc.Config(), view)

View File

@ -9,7 +9,6 @@ import (
"os"
"path"
"strings"
"time"
"git.sr.ht/~sircmpwn/aerc/models"
"git.sr.ht/~sircmpwn/aerc/widgets"
@ -84,7 +83,7 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error {
composer, err := widgets.NewComposer(aerc, acct, aerc.Config(), acct.AccountConfig(),
acct.Worker(), template, defaults, original)
if err != nil {
aerc.PushError("Error: "+err.Error(), 10*time.Second)
aerc.PushError("Error: " + err.Error())
return nil, err
}

View File

@ -2,7 +2,6 @@ package msg
import (
"errors"
"time"
"git.sr.ht/~sircmpwn/aerc/commands"
"git.sr.ht/~sircmpwn/aerc/widgets"
@ -56,9 +55,9 @@ func (ModifyLabels) Execute(aerc *widgets.Aerc, args []string) error {
switch msg := msg.(type) {
case *types.Done:
aerc.PushStatus("labels updated", 10*time.Second)
aerc.PushStatus("labels updated")
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
}
})
return nil

View File

@ -3,7 +3,6 @@ package msg
import (
"errors"
"strings"
"time"
"git.sr.ht/~sircmpwn/getopt"
@ -69,9 +68,9 @@ func (Move) Execute(aerc *widgets.Aerc, args []string) error {
switch msg := msg.(type) {
case *types.Done:
aerc.PushStatus("Message moved to "+joinedArgs, 10*time.Second)
aerc.PushStatus("Message moved to " + joinedArgs)
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
}
})
return nil

View File

@ -5,7 +5,6 @@ import (
"fmt"
"io"
"os/exec"
"time"
"git.sr.ht/~sircmpwn/aerc/commands"
"git.sr.ht/~sircmpwn/aerc/widgets"
@ -75,7 +74,7 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error {
doTerm := func(reader io.Reader, name string) {
term, err := commands.QuickTerm(aerc, cmd, reader)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
return
}
aerc.NewTab(term, name)
@ -93,16 +92,16 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error {
}()
err = ecmd.Run()
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
} else {
if ecmd.ProcessState.ExitCode() != 0 {
aerc.PushError(fmt.Sprintf(
"%s: completed with status %d", cmd[0],
ecmd.ProcessState.ExitCode()), 10*time.Second)
ecmd.ProcessState.ExitCode()))
} else {
aerc.PushStatus(fmt.Sprintf(
"%s: completed with status %d", cmd[0],
ecmd.ProcessState.ExitCode()), 10*time.Second)
ecmd.ProcessState.ExitCode()))
}
}
}

View File

@ -3,7 +3,6 @@ package msg
import (
"errors"
"sync"
"time"
"git.sr.ht/~sircmpwn/getopt"
@ -91,9 +90,9 @@ func submitReadChange(aerc *widgets.Aerc, store *lib.MessageStore,
store.Read(uids, newState, func(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done:
aerc.PushStatus(msg_success, 10*time.Second)
aerc.PushStatus(msg_success)
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
}
})
}
@ -106,7 +105,7 @@ func submitReadChangeWg(aerc *widgets.Aerc, store *lib.MessageStore,
case *types.Done:
wg.Done()
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
*success = false
wg.Done()
}
@ -136,7 +135,7 @@ func submitToggle(aerc *widgets.Aerc, store *lib.MessageStore, h *helper) error
go func() {
wg.Wait()
if success {
aerc.PushStatus(msg_success, 10*time.Second)
aerc.PushStatus(msg_success)
}
}()
return nil

View File

@ -2,7 +2,6 @@ package msg
import (
"io"
"time"
"github.com/emersion/go-message"
_ "github.com/emersion/go-message/charset"
@ -92,7 +91,7 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error {
}, func(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Error:
aerc.PushError(" "+msg.Error.Error(), 10*time.Second)
aerc.PushError(" " + msg.Error.Error())
composer.Close()
}
})

View File

@ -7,7 +7,6 @@ import (
"io"
gomail "net/mail"
"strings"
"time"
"git.sr.ht/~sircmpwn/getopt"
@ -140,7 +139,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
composer, err := widgets.NewComposer(aerc, acct, aerc.Config(),
acct.AccountConfig(), acct.Worker(), template, defaults, original)
if err != nil {
aerc.PushError("Error: "+err.Error(), 10*time.Second)
aerc.PushError("Error: " + err.Error())
return err
}

View File

@ -1,8 +1,6 @@
package msgview
import (
"time"
"git.sr.ht/~sircmpwn/aerc/commands/account"
"git.sr.ht/~sircmpwn/aerc/lib"
"git.sr.ht/~sircmpwn/aerc/widgets"
@ -42,7 +40,7 @@ func (NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error {
lib.NewMessageStoreView(nextMsg, store, aerc.DecryptKeys,
func(view lib.MessageView, err error) {
if err != nil {
aerc.PushError(err.Error(), 10*time.Second)
aerc.PushError(err.Error())
return
}
nextMv := widgets.NewMessageViewer(acct, aerc.Config(), view)

View File

@ -7,7 +7,6 @@ import (
"io/ioutil"
"mime"
"os"
"time"
"git.sr.ht/~sircmpwn/aerc/lib"
"git.sr.ht/~sircmpwn/aerc/widgets"
@ -49,23 +48,23 @@ func (Open) Execute(aerc *widgets.Aerc, args []string) error {
tmpFile, err := ioutil.TempFile(os.TempDir(), "aerc-*"+extension)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
return
}
defer tmpFile.Close()
_, err = io.Copy(tmpFile, reader)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
return
}
err = lib.OpenFile(tmpFile.Name())
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
}
aerc.PushStatus("Opened", 10*time.Second)
aerc.PushStatus("Opened")
})
return nil

View File

@ -128,10 +128,10 @@ func (Save) Execute(aerc *widgets.Aerc, args []string) error {
go func() {
err := <-ch
if err != nil {
aerc.PushError(fmt.Sprintf("Save failed: %v", err), 10*time.Second)
aerc.PushError(fmt.Sprintf("Save failed: %v", err))
return
}
aerc.PushStatus("Saved to "+path, 10*time.Second)
aerc.PushStatus("Saved to " + path)
}()
return nil
}

View File

@ -3,7 +3,6 @@ package commands
import (
"errors"
"os"
"time"
"git.sr.ht/~sircmpwn/aerc/widgets"
)
@ -30,6 +29,6 @@ func (PrintWorkDir) Execute(aerc *widgets.Aerc, args []string) error {
if err != nil {
return err
}
aerc.PushStatus(pwd, 10*time.Second)
aerc.PushStatus(pwd)
return nil
}

View File

@ -2,7 +2,6 @@ package commands
import (
"os/exec"
"time"
"github.com/riywo/loginshell"
@ -47,7 +46,7 @@ func TermCore(aerc *widgets.Aerc, args []string) error {
term.OnClose = func(err error) {
aerc.RemoveTab(term)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
}
}
return nil

View File

@ -8,7 +8,6 @@ import (
"path/filepath"
"sort"
"strings"
"time"
"git.sr.ht/~sircmpwn/aerc/lib"
"git.sr.ht/~sircmpwn/aerc/models"
@ -32,12 +31,11 @@ func QuickTerm(aerc *widgets.Aerc, args []string, stdin io.Reader) (*widgets.Ter
term.OnClose = func(err error) {
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
// remove the tab on error, otherwise it gets stuck
aerc.RemoveTab(term)
} else {
aerc.PushStatus("Process complete, press any key to close.",
10*time.Second)
aerc.PushStatus("Process complete, press any key to close.")
term.OnEvent = func(event tcell.Event) bool {
aerc.RemoveTab(term)
return true
@ -56,7 +54,7 @@ func QuickTerm(aerc *widgets.Aerc, args []string, stdin io.Reader) (*widgets.Ter
err := <-status
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
}
}

View File

@ -10,7 +10,6 @@ import (
"path"
"strconv"
"strings"
"time"
"github.com/gdamore/tcell"
"github.com/go-ini/ini"
@ -429,7 +428,7 @@ func (wizard *AccountWizard) ConfigureTemporaryAccount(temporary bool) {
func (wizard *AccountWizard) errorFor(d ui.Interactive, err error) {
if d == nil {
wizard.aerc.PushError(" "+err.Error(), 10*time.Second)
wizard.aerc.PushError(" " + err.Error())
wizard.Invalidate()
return
}
@ -444,7 +443,7 @@ func (wizard *AccountWizard) errorFor(d ui.Interactive, err error) {
wizard.step = step
wizard.focus = focus
wizard.Focus(true)
wizard.aerc.PushError(" "+err.Error(), 10*time.Second)
wizard.aerc.PushError(" " + err.Error())
wizard.Invalidate()
return
}
@ -555,7 +554,7 @@ func (wizard *AccountWizard) finish(tutorial bool) {
term.OnClose = func(err error) {
wizard.aerc.RemoveTab(term)
if err != nil {
wizard.aerc.PushError(" "+err.Error(), 10*time.Second)
wizard.aerc.PushError(" " + err.Error())
}
}
}

View File

@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"log"
"time"
"github.com/gdamore/tcell"
@ -290,7 +289,7 @@ func (acct *AccountView) getSortCriteria() []*types.SortCriterion {
}
criteria, err := sort.GetSortCriteria(acct.UiConfig().Sort)
if err != nil {
acct.aerc.PushError(" ui.sort: "+err.Error(), 10*time.Second)
acct.aerc.PushError(" ui.sort: " + err.Error())
return nil
}
return criteria

View File

@ -386,16 +386,16 @@ func (aerc *Aerc) SetError(status string) *StatusMessage {
return aerc.statusline.SetError(status)
}
func (aerc *Aerc) PushStatus(text string, expiry time.Duration) *StatusMessage {
return aerc.statusline.Push(text, expiry)
func (aerc *Aerc) PushStatus(text string) *StatusMessage {
return aerc.statusline.Push(text, 10*time.Second)
}
func (aerc *Aerc) PushError(text string, expiry time.Duration) *StatusMessage {
return aerc.statusline.PushError(text, expiry)
func (aerc *Aerc) PushError(text string) *StatusMessage {
return aerc.statusline.PushError(text, 10*time.Second)
}
func (aerc *Aerc) PushSuccess(text string, expiry time.Duration) *StatusMessage {
return aerc.statusline.PushSuccess(text, expiry)
func (aerc *Aerc) PushSuccess(text string) *StatusMessage {
return aerc.statusline.PushSuccess(text, 10*time.Second)
}
func (aerc *Aerc) focus(item ui.Interactive) {
@ -424,11 +424,11 @@ func (aerc *Aerc) BeginExCommand(cmd string) {
exline := NewExLine(aerc.conf, cmd, func(cmd string) {
parts, err := shlex.Split(cmd)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
}
err = aerc.cmd(parts)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
}
// only add to history if this is an unsimulated command,
// ie one not executed from a keybinding
@ -452,7 +452,7 @@ func (aerc *Aerc) RegisterPrompt(prompt string, cmd []string) {
}
err := aerc.cmd(cmd)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
}
}, func(cmd string) []string {
return nil // TODO: completions
@ -479,7 +479,7 @@ func (aerc *Aerc) RegisterChoices(choices []Choice) {
}
err := aerc.cmd(cmd)
if err != nil {
aerc.PushError(" "+err.Error(), 10*time.Second)
aerc.PushError(" " + err.Error())
}
}, func(cmd string) []string {
return nil // TODO: completions

View File

@ -73,7 +73,7 @@ func NewComposer(aerc *Aerc, acct *AccountView, conf *config.AercConfig,
templateData := templates.ParseTemplateData(defaults, original)
cmpl := completer.New(conf.Compose.AddressBookCmd, func(err error) {
aerc.PushError(
fmt.Sprintf("could not complete header: %v", err), 10*time.Second)
fmt.Sprintf("could not complete header: %v", err))
worker.Logger.Printf("could not complete header: %v", err)
}, aerc.Logger())
layout, editors, focusable := buildComposeHeader(aerc, cmpl, defaults)
@ -261,8 +261,7 @@ func (c *Composer) readSignatureFromFile() []byte {
signature, err := ioutil.ReadFile(sigFile)
if err != nil {
c.aerc.PushError(
fmt.Sprintf(" Error loading signature from file: %v", sigFile),
10*time.Second)
fmt.Sprintf(" Error loading signature from file: %v", sigFile))
return nil
}
return signature

View File

@ -3,7 +3,6 @@ package widgets
import (
"fmt"
"log"
"time"
"github.com/gdamore/tcell"
"github.com/mattn/go-runewidth"
@ -186,7 +185,7 @@ func (ml *MessageList) MouseEvent(localX int, localY int, event tcell.Event) {
lib.NewMessageStoreView(msg, store, ml.aerc.DecryptKeys,
func(view lib.MessageView, err error) {
if err != nil {
ml.aerc.PushError(err.Error(), 10*time.Second)
ml.aerc.PushError(err.Error())
return
}
viewer := NewMessageViewer(acct, ml.aerc.Config(), view)

View File

@ -1,15 +1,11 @@
package widgets
import (
"time"
)
type TabHost interface {
BeginExCommand(cmd string)
SetStatus(status string) *StatusMessage
SetError(err string) *StatusMessage
PushStatus(text string, expiry time.Duration) *StatusMessage
PushError(text string, expiry time.Duration) *StatusMessage
PushSuccess(text string, expiry time.Duration) *StatusMessage
PushStatus(text string) *StatusMessage
PushError(text string) *StatusMessage
PushSuccess(text string) *StatusMessage
Beep()
}