--- a/README.md Wed Mar 21 15:30:35 2018 +0100
+++ b/README.md Wed Mar 21 22:33:01 2018 +0100
@@ -164,6 +164,17 @@
% madonctl account follow --remote Gargron@mastodon.social
```
+madonctl 2.3.0+ is able to recognize the kind of argument to specify and to
+use the relevant API calls, so the previous commands could be written as:
+``` sh
+% madonctl account follow 1234
+% madonctl account follow Gargron@mastodon.social
+% madonctl account follow https://mastodon.social/@Gargron
+```
+
+Note: If you know the numeric account ID, you should use it to save extra API
+calls.
+
**Search** for accounts, statuses or hashtags:
``` sh
% madonctl search gargron
@@ -180,6 +191,14 @@
% madonctl account --user-id Gargron@mastodon.social -l5 statuses # Last 5 statuses
% madonctl account --user-id https://mastodon.social/@Gargron -l5 statuses # Same
```
+
+With madonctl 2.3.0+, you can use the shorter forms:
+``` sh
+% madonctl account statuses -l5 Gargron@mastodon.social
+% madonctl account statuses -l5 https://mastodon.social/@Gargron
+% madonctl account statuses -l5 1 # (account ID)
+```
+
Please note that the form "Gargron@mastodon.social" will only work if this
account is known by the instance. If it is unknown, the https link should work
(and the Mastodon server will learn about the account).
--- a/cmd/root.go Wed Mar 21 15:30:35 2018 +0100
+++ b/cmd/root.go Wed Mar 21 22:33:01 2018 +0100
@@ -96,18 +96,21 @@
madonctl toot --visibility private --spoiler CW "The answer was 42"
madonctl post --file image.jpg Selfie
madonctl --instance INSTANCE --login USERNAME --password PASS timeline
- madonctl accounts notifications --list --clear
- madonctl accounts blocked
- madonctl accounts search Gargron
+ madonctl account notifications --list --clear
+ madonctl account blocked
+ madonctl account search Gargron
madonctl search --resolve https://mastodon.social/@Gargron
- madonctl accounts follow --remote Gargron@mastodon.social
- madonctl accounts --account-id 399 statuses
+ madonctl account follow 37
+ madonctl account follow Gargron@mastodon.social
+ madonctl account follow https://mastodon.social/@Gargron
+ madonctl account --account-id 399 statuses
madonctl status --status-id 416671 show
madonctl status --status-id 416671 favourite
madonctl status --status-id 416671 boost
- madonctl accounts show
- madonctl accounts show -o yaml
- madonctl accounts --account-id 1 followers --template '{{.acct}}{{"\n"}}'
+ madonctl account show
+ madonctl account show Gargron@mastodon.social
+ madonctl account show -o yaml
+ madonctl account --account-id 1 followers --template '{{.acct}}{{"\n"}}'
madonctl config whoami
madonctl timeline :mastodon`,
BashCompletionFunction: shellComplFunc,