diff --git a/client.go b/client.go index a7fa7c1..c97e4b0 100644 --- a/client.go +++ b/client.go @@ -407,9 +407,6 @@ func (c *client) doCommand(action string, values []string) { func (c *client) doCommandAs(action string, values []string) { switch action { - case "C", "CHECK": - c.displayConfigValue(values[0]) - c.DrawMessage() case "ADD", "A": if len(values) < 2 { c.SetMessage(syntaxErrorMessage(action), true) @@ -502,9 +499,6 @@ func (c *client) doLinkCommandAs(action, target string, values []string) { } switch action { - case "C", "CHECK": - c.displayConfigValue(values[0]) - c.DrawMessage() case "ADD", "A": bm := make([]string, 0, 5) bm = append(bm, links[num]) diff --git a/cmdparse/parser.go b/cmdparse/parser.go index 39e08ee..dc5870a 100644 --- a/cmdparse/parser.go +++ b/cmdparse/parser.go @@ -94,10 +94,10 @@ func (p *Parser) parseAction() (*Command, error) { case Value: cm.Target = t.val cm.Type = DOLINK - case Word, Action: + case Word: cm.Value = append(cm.Value, t.val) cm.Type = DO - case Whitespace: + case Action, Whitespace: return nil, fmt.Errorf("Found %q (%d), expected value", t.val, t.kind) } t = p.scan() diff --git a/help.go b/help.go index fb87de9..a9516f3 100644 --- a/help.go +++ b/help.go @@ -1,6 +1,6 @@ package main -// ERRS maps commands to their help text +// ERRS maps commands to their syntax error message var ERRS = map[string]string{ "A": "`a [target] [name...]`", "ADD": "`add [target] [name...]`",