ref: 97eaf3bfbcd989f6a38c7fe8a1ecb6bb7e531dc5
parent: 5e1ec6cb543f4787b86e5c101fd3bb77a2ba113b
author: penny <penny@limitedideas.org>
date: Thu Oct 16 16:25:48 EDT 2025
add /version command
--- a/commands.go
+++ b/commands.go
@@ -4,7 +4,7 @@
"strings"
)
-var commands = []string{"examine", "reply", "like", "thread", "open", "prev", "download", "dm", "rt", "parent", "children", "rm", "mark", "unmark", "account", "import", "pause", "resume", "url", "fpost", "ufpost", "edit", "notice", "stats", "next", "view", "bookmarks", "follow", "unfollow", "likes", "help", "reload", "attach", "detach", "pinned", "cat", "play", "translate", "read"}+var commands = []string{"examine", "reply", "like", "thread", "open", "prev", "download", "dm", "rt", "parent", "children", "rm", "mark", "unmark", "account", "import", "pause", "resume", "url", "fpost", "ufpost", "edit", "notice", "stats", "next", "view", "bookmarks", "follow", "unfollow", "likes", "help", "reload", "attach", "detach", "pinned", "cat", "play", "translate", "read", "version"} func processInput(input string) (command string, arguments string, found bool) {--- a/main.go
+++ b/main.go
@@ -8,6 +8,7 @@
"strconv"
"strings"
"time"
+ "runtime/debug"
mastodon "codeberg.org/penny64/hellclient-go-mastodon"
"github.com/k3a/html2text"
@@ -144,6 +145,12 @@
fmt.Print(sb.String())
hc.stats.slock.Unlock()
return
+ case "version":
+ if buildInfo, ok := debug.ReadBuildInfo(); ok {+ fmt.Printf("%+v\n", buildInfo)+ return
+ }
+ fmt.Printf("No version information available.")case "prev":
if hc.page != nil {hc.page.Prev()
--
⑨