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.
5454View a list of joined rooms and direct messages.
5555.It Sy ":dms"
5656View a list of direct messages.
57.It Sy ":logout"
57.It Sy ":logout [user id]"
5858Log out of
5959.Nm .
6060.It Sy ":rooms"
@@ -63,6 +63,8 @@ View a list of joined rooms.
6363View a list of joined spaces.
6464.It Sy ":unreads"
6565View a list of unread rooms.
66.It Sy ":unreads clear"
67Mark all rooms as read.
6668.It Sy ":welcome"
6769View the startup Welcome window.
6870.El
@@ -77,39 +79,56 @@ Import and decrypt keys from
7779.Pa path .
7880.It Sy ":verify"
7981View 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.
8092.El
8193
8294.Sh "MESSAGE COMMANDS"
8395.Bl -tag -width Ds
84.It Sy ":download"
85Download an attachment from the selected message.
96.It Sy ":download [path]"
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.
86100.It Sy ":edit"
87101Edit the selected message.
88102.It Sy ":editor"
89103Open an external
90104.Ev $EDITOR
91105to compose a message.
92.It Sy ":open"
93Download and then open an attachment, or open a link in a message.
94106.It Sy ":react [shortcode]"
95107React 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.
96111.It Sy ":redact [reason]"
97Redact the selected message.
112Redact the selected message with the optional reason.
98113.It Sy ":reply"
99114Reply to the selected message.
115.It Sy ":cancel"
116Cancel the currently drafted message including replies.
100117.It Sy ":unreads clear"
101118Mark all unread rooms as read.
102.It Sy ":unreact [shortcode]"
103Remove your reaction from the selected message.
104When no arguments are given, remove all of your reactions from the message.
105.It Sy ":upload"
119.It Sy ":upload [path]"
106120Upload an attachment and send it to the currently selected room.
107121.El
108122
109123.Sh "ROOM COMMANDS"
110124.Bl -tag -width Ds
111.It Sy ":create"
112Create a new room.
125.It Sy ":create [arguments]"
126Create a new room. Arguments can be
127.Dq ++alias=[alias] ,
128.Dq ++public ,
129.Dq ++space ,
130and
131.Dq ++encrypted .
113132.It Sy ":invite accept"
114133Accept an invitation to the currently focused room.
115134.It Sy ":invite reject"
@@ -117,7 +136,7 @@ Reject an invitation to the currently focused room.
117136.It Sy ":invite send [user]"
118137Send an invitation to a user to join the currently focused room.
119138.It Sy ":join [room]"
120Join a room.
139Join a room or open it if you are already joined.
121140.It Sy ":leave"
122141Leave the currently focused room.
123142.It Sy ":members"
@@ -126,6 +145,10 @@ View a list of members of the currently focused room.
126145Set the name of the currently focused room.
127146.It Sy ":room name unset"
128147Unset 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.
129152.It Sy ":room notify set [level]"
130153Set a notification level for the currently focused room.
131154Valid levels are
@@ -153,6 +176,8 @@ Remove a tag from the currently focused room.
153176Set the topic of the currently focused room.
154177.It Sy ":room topic unset"
155178Unset the topic of the currently focused room.
179.It Sy ":room topic show"
180Show the topic of the currently focused room.
156181.It Sy ":room alias set [alias]"
157182Create and point the given alias to the room.
158183.It Sy ":room alias unset [alias]"
@@ -177,8 +202,12 @@ Kick a user from this room with an optional reason.
177202
178203.Sh "SPACE COMMANDS"
179204.Bl -tag -width Ds
180.It Sy ":space child set [room_id]"
205.It Sy ":space child set [room_id] [arguments]"
181206Add 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.
182211.It Sy ":space child remove"
183212Remove the selected room from the currently focused space.
184213.El
src/commands.rs +6 −5
@@ -484,6 +484,10 @@ fn iamb_room(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
484484 ("tag", "set", Some(s)) => RoomAction::Set(RoomField::Tag(tag_name(s)?), "".into()).into(),
485485 ("tag", "set", None) => return Result::Err(CommandError::InvalidArgument),
486486
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
487491 // :room notify set <notification-level>
488492 ("notify", "set", Some(s)) => RoomAction::Set(RoomField::NotificationMode, s).into(),
489493 ("notify", "set", None) => return Result::Err(CommandError::InvalidArgument),
@@ -496,10 +500,6 @@ fn iamb_room(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
496500 ("notify", "show", None) => RoomAction::Show(RoomField::NotificationMode).into(),
497501 ("notify", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument),
498502
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
503503 // :room aliases show
504504 ("alias", "show", None) => RoomAction::Show(RoomField::Aliases).into(),
505505 ("alias", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument),
@@ -563,13 +563,14 @@ fn iamb_space(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
563563 };
564564
565565 let act: IambAction = match (field.as_str(), action.as_str()) {
566 // :space child remove
566567 ("child", "remove") => {
567568 if !(args.is_empty()) {
568569 return Err(CommandError::InvalidArgument);
569570 }
570571 SpaceAction::RemoveChild.into()
571572 },
572 // :space child set
573 // :space child set <child>
573574 ("child", "set") => {
574575 let mut order = None;
575576 let mut suggested = false;