diff --git a/docs/iamb.1 b/docs/iamb.1 index 2487b927..a934f31e 100644 --- a/docs/iamb.1 +++ b/docs/iamb.1 @@ -50,20 +50,20 @@ version and quit. .Sh "GENERAL COMMANDS" .Bl -tag -width Ds -.It Sy ":chats" +.It Sy ":c[hats]" View a list of joined rooms and direct messages. .It Sy ":dms" View a list of direct messages. .It Sy ":logout [user id]" Log out of .Nm . -.It Sy ":rooms" +.It Sy ":ro[oms]" View a list of joined rooms. -.It Sy ":spaces" +.It Sy ":s[paces]" View a list of joined spaces. -.It Sy ":unreads" +.It Sy ":u[nreads]" View a list of unread rooms. -.It Sy ":unreads clear" +.It Sy ":u[nreads] clear" Mark all rooms as read. .It Sy ":welcome" View the startup Welcome window. @@ -93,28 +93,28 @@ Request a new verification with the specified user. .Sh "MESSAGE COMMANDS" .Bl -tag -width Ds -.It Sy ":download [path]" +.It Sy ":d[ownload] [path]" Download an attachment from the selected message and save it to the optional path. -.It Sy ":open [path]" +.It Sy ":o[pen] [path]" Download and then open an attachment, or open a link in a message. -.It Sy ":edit" +.It Sy ":e[dit]" Edit the selected message. -.It Sy ":editor" +.It Sy ":ed[itor]" Open an external .Ev $EDITOR to compose a message. -.It Sy ":react [shortcode]" +.It Sy ":r[ea]c[t] [shortcode]" React to the selected message with an Emoji. -.It Sy ":unreact [shortcode]" +.It Sy ":unr[eact] [shortcode]" Remove your reaction from the selected message. When no arguments are given, remove all of your reactions from the message. -.It Sy ":redact [reason]" +.It Sy ":red[act] [reason]" Redact the selected message with the optional reason. -.It Sy ":reply" +.It Sy ":rep[ly]" Reply to the selected message. -.It Sy ":cancel" +.It Sy ":ca[ncel]" Cancel the currently drafted message including replies. -.It Sy ":upload [path]" +.It Sy ":up[load] [path]" Upload an attachment and send it to the currently selected room. .El @@ -137,7 +137,7 @@ Send an invitation to a user to join the currently focused room. Join a room or open it if you are already joined. .It Sy ":leave" Leave the currently focused room. -.It Sy ":members" +.It Sy ":m[embers]" View a list of members of the currently focused room. .It Sy ":room name set [name]" Set the name of the currently focused room. diff --git a/src/base.rs b/src/base.rs index bb4f491d..6a62f0db 100644 --- a/src/base.rs +++ b/src/base.rs @@ -2074,7 +2074,7 @@ fn complete_cmdarg( match cmd.name.as_str() { "cancel" | "dms" | "edit" | "redact" | "reply" => vec![], "members" | "rooms" | "spaces" | "welcome" => vec![], - "download" | "keys" | "open" | "upload" => complete_path(text, cursor), + "download" | "d" | "keys" | "open" | "o" | "upload" | "up" => complete_path(text, cursor), "react" | "unreact" => complete_emoji(text, cursor, store), "invite" => complete_users(text, cursor, store), diff --git a/src/commands.rs b/src/commands.rs index c70a2aff..c63eb946 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -698,7 +698,7 @@ fn iamb_logout(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult { fn add_iamb_commands(cmds: &mut ProgramCommands) { cmds.add_command(ProgramCommand { name: "cancel".into(), - aliases: vec![], + aliases: vec!["ca".into()], f: iamb_cancel, }); cmds.add_command(ProgramCommand { @@ -708,17 +708,25 @@ fn add_iamb_commands(cmds: &mut ProgramCommands) { }); cmds.add_command(ProgramCommand { name: "chats".into(), - aliases: vec![], + aliases: vec!["c".into()], f: iamb_chats, }); cmds.add_command(ProgramCommand { name: "dms".into(), aliases: vec![], f: iamb_dms }); cmds.add_command(ProgramCommand { name: "download".into(), - aliases: vec![], + aliases: vec!["d".into()], f: iamb_download, }); - cmds.add_command(ProgramCommand { name: "open".into(), aliases: vec![], f: iamb_open }); - cmds.add_command(ProgramCommand { name: "edit".into(), aliases: vec![], f: iamb_edit }); + cmds.add_command(ProgramCommand { + name: "open".into(), + aliases: vec!["o".into()], + f: iamb_open, + }); + cmds.add_command(ProgramCommand { + name: "edit".into(), + aliases: vec!["e".into()], + f: iamb_edit, + }); cmds.add_command(ProgramCommand { name: "invite".into(), aliases: vec![], @@ -733,27 +741,27 @@ fn add_iamb_commands(cmds: &mut ProgramCommands) { }); cmds.add_command(ProgramCommand { name: "members".into(), - aliases: vec![], + aliases: vec!["m".into()], f: iamb_members, }); cmds.add_command(ProgramCommand { name: "react".into(), - aliases: vec![], + aliases: vec!["rc".into(), "reac".into(), "rct".into()], f: iamb_react, }); cmds.add_command(ProgramCommand { name: "redact".into(), - aliases: vec![], + aliases: vec!["red".into()], f: iamb_redact, }); cmds.add_command(ProgramCommand { name: "reply".into(), - aliases: vec![], + aliases: vec!["rep".into()], f: iamb_reply, }); cmds.add_command(ProgramCommand { name: "rooms".into(), - aliases: vec![], + aliases: vec!["ro".into()], f: iamb_rooms, }); cmds.add_command(ProgramCommand { name: "room".into(), aliases: vec![], f: iamb_room }); @@ -764,22 +772,22 @@ fn add_iamb_commands(cmds: &mut ProgramCommands) { }); cmds.add_command(ProgramCommand { name: "spaces".into(), - aliases: vec![], + aliases: vec!["s".into()], f: iamb_spaces, }); cmds.add_command(ProgramCommand { name: "unreads".into(), - aliases: vec![], + aliases: vec!["u".into()], f: iamb_unreads, }); cmds.add_command(ProgramCommand { name: "unreact".into(), - aliases: vec![], + aliases: vec!["unr".into()], f: iamb_unreact, }); cmds.add_command(ProgramCommand { name: "upload".into(), - aliases: vec![], + aliases: vec!["up".into()], f: iamb_upload, }); cmds.add_command(ProgramCommand { @@ -794,7 +802,7 @@ fn add_iamb_commands(cmds: &mut ProgramCommands) { }); cmds.add_command(ProgramCommand { name: "editor".into(), - aliases: vec![], + aliases: vec!["ed".into()], f: iamb_editor, }); cmds.add_command(ProgramCommand {