Commit a9cb5608f0
Unregistered key
Layout: unified · split
docs/iamb.1 +43 −14
| @@ -54,7 +54,7 @@ version and quit. | |||
| 54 | View a list of joined rooms and direct messages. | 54 | View a list of joined rooms and direct messages. |
| 55 | .It Sy ":dms" | 55 | .It Sy ":dms" |
| 56 | View a list of direct messages. | 56 | View a list of direct messages. |
| 57 | .It Sy ":logout" | 57 | .It Sy ":logout [user id]" |
| 58 | Log out of | 58 | Log out of |
| 59 | .Nm . | 59 | .Nm . |
| 60 | .It Sy ":rooms" | 60 | .It Sy ":rooms" |
| @@ -63,6 +63,8 @@ View a list of joined rooms. | |||
| 63 | View a list of joined spaces. | 63 | View a list of joined spaces. |
| 64 | .It Sy ":unreads" | 64 | .It Sy ":unreads" |
| 65 | View a list of unread rooms. | 65 | View a list of unread rooms. |
| 66 | .It Sy ":unreads clear" | ||
| 67 | Mark all rooms as read. | ||
| 66 | .It Sy ":welcome" | 68 | .It Sy ":welcome" |
| 67 | View the startup Welcome window. | 69 | View 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" |
| 79 | View a list of ongoing E2EE verifications. | 81 | View a list of ongoing E2EE verifications. |
| 82 | .It Sy ":verify accept [key]" | ||
| 83 | Accept a verification request. | ||
| 84 | .It Sy ":verify cancel [key]" | ||
| 85 | Cancel an in-progress verification. | ||
| 86 | .It Sy ":verify confirm [key]" | ||
| 87 | Confirm an in-progress verification. | ||
| 88 | .It Sy ":verify mismatch [key]" | ||
| 89 | Reject an in-progress verification due to mismatched Emoji. | ||
| 90 | .It Sy ":verify request [user id]" | ||
| 91 | Request 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]" |
| 85 | Download an attachment from the selected message. | 97 | Download an attachment from the selected message and save it to the optional path. |
| 98 | .It Sy ":open [path]" | ||
| 99 | Download and then open an attachment, or open a link in a message. | ||
| 86 | .It Sy ":edit" | 100 | .It Sy ":edit" |
| 87 | Edit the selected message. | 101 | Edit the selected message. |
| 88 | .It Sy ":editor" | 102 | .It Sy ":editor" |
| 89 | Open an external | 103 | Open an external |
| 90 | .Ev $EDITOR | 104 | .Ev $EDITOR |
| 91 | to compose a message. | 105 | to compose a message. |
| 92 | .It Sy ":open" | ||
| 93 | Download and then open an attachment, or open a link in a message. | ||
| 94 | .It Sy ":react [shortcode]" | 106 | .It Sy ":react [shortcode]" |
| 95 | React to the selected message with an Emoji. | 107 | React to the selected message with an Emoji. |
| 108 | .It Sy ":unreact [shortcode]" | ||
| 109 | Remove your reaction from the selected message. | ||
| 110 | When no arguments are given, remove all of your reactions from the message. | ||
| 96 | .It Sy ":redact [reason]" | 111 | .It Sy ":redact [reason]" |
| 97 | Redact the selected message. | 112 | Redact the selected message with the optional reason. |
| 98 | .It Sy ":reply" | 113 | .It Sy ":reply" |
| 99 | Reply to the selected message. | 114 | Reply to the selected message. |
| 115 | .It Sy ":cancel" | ||
| 116 | Cancel the currently drafted message including replies. | ||
| 100 | .It Sy ":unreads clear" | 117 | .It Sy ":unreads clear" |
| 101 | Mark all unread rooms as read. | 118 | Mark all unread rooms as read. |
| 102 | .It Sy ":unreact [shortcode]" | 119 | .It Sy ":upload [path]" |
| 103 | Remove your reaction from the selected message. | ||
| 104 | When no arguments are given, remove all of your reactions from the message. | ||
| 105 | .It Sy ":upload" | ||
| 106 | Upload an attachment and send it to the currently selected room. | 120 | Upload 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]" |
| 112 | Create a new room. | 126 | Create a new room. Arguments can be |
| 127 | .Dq ++alias=[alias] , | ||
| 128 | .Dq ++public , | ||
| 129 | .Dq ++space , | ||
| 130 | and | ||
| 131 | .Dq ++encrypted . | ||
| 113 | .It Sy ":invite accept" | 132 | .It Sy ":invite accept" |
| 114 | Accept an invitation to the currently focused room. | 133 | Accept 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]" |
| 118 | Send an invitation to a user to join the currently focused room. | 137 | Send an invitation to a user to join the currently focused room. |
| 119 | .It Sy ":join [room]" | 138 | .It Sy ":join [room]" |
| 120 | Join a room. | 139 | Join a room or open it if you are already joined. |
| 121 | .It Sy ":leave" | 140 | .It Sy ":leave" |
| 122 | Leave the currently focused room. | 141 | Leave 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. | |||
| 126 | Set the name of the currently focused room. | 145 | Set the name of the currently focused room. |
| 127 | .It Sy ":room name unset" | 146 | .It Sy ":room name unset" |
| 128 | Unset the name of the currently focused room. | 147 | Unset the name of the currently focused room. |
| 148 | .It Sy ":room dm set" | ||
| 149 | Mark the currently focused room as a direct message. | ||
| 150 | .It Sy ":room dm unset" | ||
| 151 | Mark the currently focused room as a normal room. | ||
| 129 | .It Sy ":room notify set [level]" | 152 | .It Sy ":room notify set [level]" |
| 130 | Set a notification level for the currently focused room. | 153 | Set a notification level for the currently focused room. |
| 131 | Valid levels are | 154 | Valid levels are |
| @@ -153,6 +176,8 @@ Remove a tag from the currently focused room. | |||
| 153 | Set the topic of the currently focused room. | 176 | Set the topic of the currently focused room. |
| 154 | .It Sy ":room topic unset" | 177 | .It Sy ":room topic unset" |
| 155 | Unset the topic of the currently focused room. | 178 | Unset the topic of the currently focused room. |
| 179 | .It Sy ":room topic show" | ||
| 180 | Show the topic of the currently focused room. | ||
| 156 | .It Sy ":room alias set [alias]" | 181 | .It Sy ":room alias set [alias]" |
| 157 | Create and point the given alias to the room. | 182 | Create 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]" |
| 181 | Add a room to the currently focused space. | 206 | Add a room to the currently focused space. |
| 207 | .Dq ++suggested | ||
| 208 | marks the room as a suggested child. | ||
| 209 | .Dq ++order=[string] | ||
| 210 | specifies a string by which children are lexicographically ordered. | ||
| 182 | .It Sy ":space child remove" | 211 | .It Sy ":space child remove" |
| 183 | Remove the selected room from the currently focused space. | 212 | Remove 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; |