Browse Source

Adds version command

pull/198/head
sloum 5 months ago
parent
commit
228ec598ab
  1. 2
      VERSION
  2. 3
      client.go
  3. 2
      cmdparse/lexer.go
  4. 1
      help.go

2
VERSION

@ -1 +1 @@
2.3.2
2.3.3

3
client.go

@ -345,6 +345,9 @@ func (c *client) simpleCommand(action string) {
c.search("", "", "?")
case "HELP", "?":
go c.Visit(helplocation)
case "VERSION":
c.SetMessage("Bombadillo version: " + version, false)
c.DrawMessage()
default:
c.SetMessage(syntaxErrorMessage(action), true)
c.DrawMessage()

2
cmdparse/lexer.go

@ -72,7 +72,7 @@ func (s *scanner) scanText() Token {
"S", "SET", "R", "RELOAD", "SEARCH",
"Q", "QUIT", "B", "BOOKMARKS", "H",
"HOME", "?", "HELP", "C", "CHECK",
"P", "PURGE":
"P", "PURGE", "VERSION":
return Token{Action, capInput}
}

1
help.go

@ -25,4 +25,5 @@ var ERRS = map[string]string{
"WRITE": "`write [target]`",
"?": "`?`",
"HELP": "`help`",
"VERSION": "`version`",
}
Loading…
Cancel
Save