diff --git a/Makefile b/Makefile index ddbc4bc..cca7657 100644 --- a/Makefile +++ b/Makefile @@ -13,17 +13,9 @@ test : GOCMD := go1.11.13 # %:z - so settle for %z. BUILD_TIME := ${shell date "+%Y-%m-%dT%H:%M%z"} -# If VERSION is empty or not defined use the contents of the VERSION file -VERSION := ${shell git describe --exact-match 2> /dev/null} -ifndef VERSION - VERSION := ${shell cat ./VERSION} -endif - -LDFLAGS := -ldflags "-s -X main.version=${VERSION} -X main.build=${BUILD_TIME}" - .PHONY: build build: - ${GOCMD} build ${LDFLAGS} -o ${BINARY} + ${GOCMD} build -o ${BINARY} .PHONY: install install: install-bin install-man install-desktop clean diff --git a/VERSION b/VERSION index f90b1af..0bee604 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.3.2 +2.3.3 diff --git a/bombadillo.1 b/bombadillo.1 index a66816d..cc404d4 100644 --- a/bombadillo.1 +++ b/bombadillo.1 @@ -209,6 +209,10 @@ set [setting name] [value] Sets the value for a given configuration setting. \fIs\fP can be used instead of the full \fIset\fP. .TP .B +version +Shows the current Bombadillo version number. +.TP +.B write . Writes the current document to a file. The file is named by the last component of the url path. If the last component is blank or \fI/\fP a default name will be used. The file saves to the directory set by the \fIsavelocation\fP setting. \fIw\fP can be entered rather than the full \fIwrite\fP. .TP @@ -246,7 +250,7 @@ The path to the directory that \fBbombadillo\fP should write files to. This must .TP .B searchengine -The url to use for the LINE COMMANDs \fI?\fP and \fIsearch\fP. Should be a valid search path that terms may be appended to. +The url to use for the LINE COMMAND \fIsearch\fP. Should be a valid search path that terms may be appended to. .TP .B telnetcommand @@ -259,6 +263,8 @@ Can toggle between visual modes. Valid values are \fInormal\fP, \fIcolor\fP, and .B timeout The number of seconds after which connections to gopher or gemini servers should time out if the server has not responded. +.TP +.B webmode Controls behavior when following web links. The following values are valid: \fInone\fP will disable following web links, \fIgui\fP will have the browser attempt to open web links in a user's default graphical web browser; \fIlynx\fP, \fIw3m\fP, and \fIelinks\fP will have the browser attempt to use the selected terminal web browser to handle the rendering of web pages and will display the pages directly in Bombadillo. diff --git a/client.go b/client.go index 2617247..c8535eb 100644 --- a/client.go +++ b/client.go @@ -258,6 +258,7 @@ func (c *client) TakeControlInput() { } err = c.NextSearchItem(0) if err != nil { + c.PageState.History[c.PageState.Position].WrapContent(c.Width-1,(c.Options["theme"] == "color")) c.Draw() } case ':', ' ': @@ -345,6 +346,13 @@ func (c *client) simpleCommand(action string) { c.search("", "", "?") case "HELP", "?": c.Visit(helplocation) + case "VERSION": + ver := version + if ver == "" { + ver = "Improperly compiled, no version information" + } + c.SetMessage("Bombadillo version: " + ver, false) + c.DrawMessage() default: c.SetMessage(syntaxErrorMessage(action), true) c.DrawMessage() diff --git a/cmdparse/lexer.go b/cmdparse/lexer.go index 8b882c3..c17eb4f 100644 --- a/cmdparse/lexer.go +++ b/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} } diff --git a/help.go b/help.go index ece82db..c41d4c5 100644 --- a/help.go +++ b/help.go @@ -23,6 +23,7 @@ var ERRS = map[string]string{ "SET": "`set [setting] [value]`", "W": "`w [target]`", "WRITE": "`write [target]`", + "VERSION": "`version`", "?": "`? [[command]]`", "HELP": "`help [[command]]`", } diff --git a/main.go b/main.go index 82c27da..bee9c41 100644 --- a/main.go +++ b/main.go @@ -35,8 +35,7 @@ import ( "tildegit.org/sloum/bombadillo/gemini" ) -var version string -var build string +var version string = "2.3.3" var bombadillo *client var helplocation string = "gopher://bombadillo.colorfield.space:70/1/user-guide.map" @@ -211,7 +210,7 @@ func main() { flag.Usage = printHelp flag.Parse() if *getVersion { - fmt.Printf("Bombadillo %s - build %s\n", version, build) + fmt.Printf("Bombadillo %s\n", version) os.Exit(0) } args := flag.Args()