about summary refs log tree commit diff stats
path: root/src/command/cmd_defs.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2023-05-09 19:58:21 +0200
committerMichael Vetter <jubalh@iodoru.org>2023-05-10 09:34:48 +0200
commit8075b32ebc6311d7985e94c780fafecc4e8def9f (patch)
tree7cc62defb4e2dfb4df6c279e2f100fdd3937fc8a /src/command/cmd_defs.c
parentdaf3d193e226648a2b3f0021731ec006956727e5 (diff)
downloadprofani-tty-8075b32ebc6311d7985e94c780fafecc4e8def9f.tar.gz
Align avatar behaviour with urlopen
`/executable avatar` now also uses cmdtemplate and parse %p.
It seems to me that the `/avatar` command was actually completely broken
on master.
Diffstat (limited to 'src/command/cmd_defs.c')
-rw-r--r--src/command/cmd_defs.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c
index c6e886a5..ceb84d05 100644
--- a/src/command/cmd_defs.c
+++ b/src/command/cmd_defs.c
@@ -2437,7 +2437,7 @@ static const struct cmd_t command_defs[] = {
               { "set <path>", "Set avatar to the image at <path>." },
               { "disable", "Disable avatar publishing; your avatar will not display to others." },
               { "get <barejid>", "Download the avatar. barejid is the JID to download avatar from." },
-              { "open <barejid>", "Download avatar and open it with command." })
+              { "open <barejid>", "Download avatar and open it with command. See /executable." })
       CMD_EXAMPLES(
               "/avatar set ~/images/avatar.png",
               "/avatar disable",
@@ -2534,7 +2534,8 @@ static const struct cmd_t command_defs[] = {
       CMD_TAGS(
               CMD_TAG_DISCOVERY)
       CMD_SYN(
-              "/executable avatar <cmd>",
+              "/executable avatar set <cmdtemplate>",
+              "/executable avatar default",
               "/executable urlopen set <cmdtemplate>",
               "/executable urlopen default",
               "/executable urlsave set <cmdtemplate>",
@@ -2545,7 +2546,8 @@ static const struct cmd_t command_defs[] = {
       CMD_DESC(
               "Configure executable that should be called upon a certain command.")
       CMD_ARGS(
-              { "avatar", "Set executable that is run by /avatar open. Use your favorite image viewer." },
+              { "avatar set", "Set executable that is run by /avatar open. Use your favorite image viewer." },
+              { "avatar default", "Restore to default settings." },
               { "urlopen set", "Set executable that is run by /url open. Takes a command template that replaces %u and %p with the URL and path respectively." },
               { "urlopen default", "Restore to default settings." },
               { "urlsave set", "Set executable that is run by /url save. Takes a command template that replaces %u and %p with the URL and path respectively." },