Commit a9cb5608f0

a9cb5608f03ae864881ef5faf2362fe094f3d589

parent: c420c9dd65

Unregistered key

VAWVAW <vaw@nlih.de> · 2025-06-05 04:57 UTC
committer: <noreply@github.com>

Document every client command in the manual page (#441)

Layout: unified · split

docs/iamb.1 +43 −14
@@ -54,7 +54,7 @@ version and quit.
54View a list of joined rooms and direct messages. 54View a list of joined rooms and direct messages.
55.It Sy ":dms" 55.It Sy ":dms"
56View a list of direct messages. 56View a list of direct messages.
57.It Sy ":logout" 57.It Sy ":logout [user id]"
58Log out of 58Log out of
59.Nm . 59.Nm .
60.It Sy ":rooms" 60.It Sy ":rooms"
@@ -63,6 +63,8 @@ View a list of joined rooms.
63View a list of joined spaces. 63View a list of joined spaces.
64.It Sy ":unreads" 64.It Sy ":unreads"
65View a list of unread rooms. 65View a list of unread rooms.
66.It Sy ":unreads clear"
67Mark all rooms as read.
66.It Sy ":welcome" 68.It Sy ":welcome"
67View the startup Welcome window. 69View the startup Welcome window.
68.El 70.El
@@ -77,39 +79,56 @@ Import and decrypt keys from
77.Pa path . 79.Pa path .
78.It Sy ":verify" 80.It Sy ":verify"
79View a list of ongoing E2EE verifications. 81View a list of ongoing E2EE verifications.
82.It Sy ":verify accept [key]"
83Accept a verification request.
84.It Sy ":verify cancel [key]"
85Cancel an in-progress verification.
86.It Sy ":verify confirm [key]"
87Confirm an in-progress verification.
88.It Sy ":verify mismatch [key]"
89Reject an in-progress verification due to mismatched Emoji.
90.It Sy ":verify request [user id]"
91Request a new verification with the specified user.
80.El 92.El
81 93
82.Sh "MESSAGE COMMANDS" 94.Sh "MESSAGE COMMANDS"
83.Bl -tag -width Ds 95.Bl -tag -width Ds
84.It Sy ":download" 96.It Sy ":download [path]"
85Download an attachment from the selected message. 97Download an attachment from the selected message and save it to the optional path.
98.It Sy ":open [path]"
99Download and then open an attachment, or open a link in a message.
86.It Sy ":edit" 100.It Sy ":edit"
87Edit the selected message. 101Edit the selected message.
88.It Sy ":editor" 102.It Sy ":editor"
89Open an external 103Open an external
90.Ev $EDITOR 104.Ev $EDITOR
91to compose a message. 105to compose a message.
92.It Sy ":open"
93Download and then open an attachment, or open a link in a message.
94.It Sy ":react [shortcode]" 106.It Sy ":react [shortcode]"
95React to the selected message with an Emoji. 107React to the selected message with an Emoji.
108.It Sy ":unreact [shortcode]"
109Remove your reaction from the selected message.
110When no arguments are given, remove all of your reactions from the message.
96.It Sy ":redact [reason]" 111.It Sy ":redact [reason]"
97Redact the selected message. 112Redact the selected message with the optional reason.
98.It Sy ":reply" 113.It Sy ":reply"
99Reply to the selected message. 114Reply to the selected message.
115.It Sy ":cancel"
116Cancel the currently drafted message including replies.
100.It Sy ":unreads clear" 117.It Sy ":unreads clear"
101Mark all unread rooms as read. 118Mark all unread rooms as read.
102.It Sy ":unreact [shortcode]" 119.It Sy ":upload [path]"
103Remove your reaction from the selected message.
104When no arguments are given, remove all of your reactions from the message.
105.It Sy ":upload"
106Upload an attachment and send it to the currently selected room. 120Upload an attachment and send it to the currently selected room.
107.El 121.El
108 122
109.Sh "ROOM COMMANDS" 123.Sh "ROOM COMMANDS"
110.Bl -tag -width Ds 124.Bl -tag -width Ds
111.It Sy ":create" 125.It Sy ":create [arguments]"
112Create a new room. 126Create a new room. Arguments can be
127.Dq ++alias=[alias] ,
128.Dq ++public ,
129.Dq ++space ,
130and
131.Dq ++encrypted .
113.It Sy ":invite accept" 132.It Sy ":invite accept"
114Accept an invitation to the currently focused room. 133Accept an invitation to the currently focused room.
115.It Sy ":invite reject" 134.It Sy ":invite reject"
@@ -117,7 +136,7 @@ Reject an invitation to the currently focused room.
117.It Sy ":invite send [user]" 136.It Sy ":invite send [user]"
118Send an invitation to a user to join the currently focused room. 137Send an invitation to a user to join the currently focused room.
119.It Sy ":join [room]" 138.It Sy ":join [room]"
120Join a room. 139Join a room or open it if you are already joined.
121.It Sy ":leave" 140.It Sy ":leave"
122Leave the currently focused room. 141Leave the currently focused room.
123.It Sy ":members" 142.It Sy ":members"
@@ -126,6 +145,10 @@ View a list of members of the currently focused room.
126Set the name of the currently focused room. 145Set the name of the currently focused room.
127.It Sy ":room name unset" 146.It Sy ":room name unset"
128Unset the name of the currently focused room. 147Unset the name of the currently focused room.
148.It Sy ":room dm set"
149Mark the currently focused room as a direct message.
150.It Sy ":room dm unset"
151Mark the currently focused room as a normal room.
129.It Sy ":room notify set [level]" 152.It Sy ":room notify set [level]"
130Set a notification level for the currently focused room. 153Set a notification level for the currently focused room.
131Valid levels are 154Valid levels are
@@ -153,6 +176,8 @@ Remove a tag from the currently focused room.
153Set the topic of the currently focused room. 176Set the topic of the currently focused room.
154.It Sy ":room topic unset" 177.It Sy ":room topic unset"
155Unset the topic of the currently focused room. 178Unset the topic of the currently focused room.
179.It Sy ":room topic show"
180Show the topic of the currently focused room.
156.It Sy ":room alias set [alias]" 181.It Sy ":room alias set [alias]"
157Create and point the given alias to the room. 182Create and point the given alias to the room.
158.It Sy ":room alias unset [alias]" 183.It Sy ":room alias unset [alias]"
@@ -177,8 +202,12 @@ Kick a user from this room with an optional reason.
177 202
178.Sh "SPACE COMMANDS" 203.Sh "SPACE COMMANDS"
179.Bl -tag -width Ds 204.Bl -tag -width Ds
180.It Sy ":space child set [room_id]" 205.It Sy ":space child set [room_id] [arguments]"
181Add a room to the currently focused space. 206Add a room to the currently focused space.
207.Dq ++suggested
208marks the room as a suggested child.
209.Dq ++order=[string]
210specifies a string by which children are lexicographically ordered.
182.It Sy ":space child remove" 211.It Sy ":space child remove"
183Remove the selected room from the currently focused space. 212Remove the selected room from the currently focused space.
184.El 213.El
src/commands.rs +6 −5
@@ -484,6 +484,10 @@ fn iamb_room(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
484 ("tag", "set", Some(s)) => RoomAction::Set(RoomField::Tag(tag_name(s)?), "".into()).into(), 484 ("tag", "set", Some(s)) => RoomAction::Set(RoomField::Tag(tag_name(s)?), "".into()).into(),
485 ("tag", "set", None) => return Result::Err(CommandError::InvalidArgument), 485 ("tag", "set", None) => return Result::Err(CommandError::InvalidArgument),
486 486
487 // :room tag unset <tag-name>
488 ("tag", "unset", Some(s)) => RoomAction::Unset(RoomField::Tag(tag_name(s)?)).into(),
489 ("tag", "unset", None) => return Result::Err(CommandError::InvalidArgument),
490
487 // :room notify set <notification-level> 491 // :room notify set <notification-level>
488 ("notify", "set", Some(s)) => RoomAction::Set(RoomField::NotificationMode, s).into(), 492 ("notify", "set", Some(s)) => RoomAction::Set(RoomField::NotificationMode, s).into(),
489 ("notify", "set", None) => return Result::Err(CommandError::InvalidArgument), 493 ("notify", "set", None) => return Result::Err(CommandError::InvalidArgument),
@@ -496,10 +500,6 @@ fn iamb_room(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
496 ("notify", "show", None) => RoomAction::Show(RoomField::NotificationMode).into(), 500 ("notify", "show", None) => RoomAction::Show(RoomField::NotificationMode).into(),
497 ("notify", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument), 501 ("notify", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument),
498 502
499 // :room tag unset <tag-name>
500 ("tag", "unset", Some(s)) => RoomAction::Unset(RoomField::Tag(tag_name(s)?)).into(),
501 ("tag", "unset", None) => return Result::Err(CommandError::InvalidArgument),
502
503 // :room aliases show 503 // :room aliases show
504 ("alias", "show", None) => RoomAction::Show(RoomField::Aliases).into(), 504 ("alias", "show", None) => RoomAction::Show(RoomField::Aliases).into(),
505 ("alias", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument), 505 ("alias", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument),
@@ -563,13 +563,14 @@ fn iamb_space(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
563 }; 563 };
564 564
565 let act: IambAction = match (field.as_str(), action.as_str()) { 565 let act: IambAction = match (field.as_str(), action.as_str()) {
566 // :space child remove
566 ("child", "remove") => { 567 ("child", "remove") => {
567 if !(args.is_empty()) { 568 if !(args.is_empty()) {
568 return Err(CommandError::InvalidArgument); 569 return Err(CommandError::InvalidArgument);
569 } 570 }
570 SpaceAction::RemoveChild.into() 571 SpaceAction::RemoveChild.into()
571 }, 572 },
572 // :space child set 573 // :space child set <child>
573 ("child", "set") => { 574 ("child", "set") => {
574 let mut order = None; 575 let mut order = None;
575 let mut suggested = false; 576 let mut suggested = false;