ref: e9c786524209de664b6dab56ccb581bca7df86eb
parent: 641db60c818750f2d5a4e5fcaddda7392336f684
author: penny <penny@limitedideas.org>
date: Mon Nov 10 07:26:14 EST 2025
add /examine debug command back
--- a/commands.go
+++ b/commands.go
@@ -12,8 +12,6 @@
mastodon "codeberg.org/penny64/hellclient-go-mastodon"
)
-var commands = []string{"examine", "reply", "like", "thread", "open", "prev", "download", "dm", "rt", "hrt", "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", "local", "public", "block", "unblock", "unlike", "home", "page", "profile"}-
func processInput(input string, commands []string) (command string, arguments string, found bool) { if input == "" {@@ -173,8 +171,12 @@
// Command needs us to resolve @user@domain targets as indexes
if flags&acc_resolve != 0 {data.account = data.lookupAccount(loader)
- if data.status != nil && data.account != nil && data.status.ID != data.account.ID {- data.status = nil
+ if data.status != nil {+ if data.account != nil {+ if data.status.Account.ID != data.account.ID {+ data.status = nil
+ }
+ }
}
}
@@ -1247,6 +1249,23 @@
return cmd
}
+//self printer fixme
+func (hc *Hellclient) examinecmd() cmder {+ cmd := &basiccmd{}+ cmd.hc = hc
+ cmd.bname = "examine"
+ cmd.bflags = account | acc_resolve
+ cmd.doer = func(data *cmddata) string {+ if data.status != nil {+ hc.PrintObjectProperties(data.status)
+ return ""
+ }
+ hc.PrintObjectProperties(data.account)
+ return ""
+ }
+ return cmd
+}
+
// Commmands are lazy evaluated in this order
// Single/two letter matches need to match the most common commands
func (hc *Hellclient) newCmdArray() []cmder {@@ -1299,6 +1318,7 @@
hc.threadcmd(),
hc.followcmd(),
hc.filtercmd("fpost", true),+ hc.examinecmd(),
}
return cmdarray
--- a/todo.md
+++ b/todo.md
@@ -27,6 +27,7 @@
- [ ] edit history command /history
- [ ] authorize oauth tokens
- [ ] plaintext => self authorize oauth
+ - [ ] -h and -w to specify size of output
- [x] label hellclient
- [x] display name in /cat
- [x] Print statuses from myself even when paused!
@@ -38,7 +39,7 @@
- [x] Qualified usernames in cat
- [x] Incoming content warnings
- [x] /block
- - [x] /unlblock
+ - [x] /unblock
- [x] unlike command
- [x] Dm pages
- [x] fix file picker can elaborate
--
⑨