mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Added individual command help
This commit is contained in:
parent
2f8a53fa35
commit
254866e8b9
150
src/command.c
150
src/command.c
@ -82,58 +82,98 @@ static struct cmd_t main_commands[] =
|
|||||||
_cmd_help,
|
_cmd_help,
|
||||||
{ "/help [command]", "This help, or help on a specific command",
|
{ "/help [command]", "This help, or help on a specific command",
|
||||||
{ "/help [command]",
|
{ "/help [command]",
|
||||||
"---------------"
|
"---------------",
|
||||||
|
"List all commands with short help on what they do.",
|
||||||
|
"Specify the command if you want more detailed help on a specific command.",
|
||||||
"",
|
"",
|
||||||
"/help will list all commands with short help on what they do.",
|
"Example : /help connect",
|
||||||
"/help [command] will give more detailed help on a specific command.",
|
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/connect",
|
{ "/connect",
|
||||||
_cmd_connect,
|
_cmd_connect,
|
||||||
{ "/connect user@host", "Login to jabber.",
|
{ "/connect user@host", "Login to jabber.",
|
||||||
{ "Ahh",
|
{ "/connect user@host",
|
||||||
|
"------------------",
|
||||||
|
"Connect to the jabber server at host using the username user.",
|
||||||
|
"Profanity should work with any XMPP (Jabber) compliant chat host.",
|
||||||
|
"You can use tab completion to autocomplete any logins you have used before.",
|
||||||
|
"",
|
||||||
|
"Example: /connect myuser@gmail.com",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/prefs",
|
{ "/prefs",
|
||||||
_cmd_prefs,
|
_cmd_prefs,
|
||||||
{ "/prefs", "Show current preferences.",
|
{ "/prefs", "Show current preferences.",
|
||||||
{ "Ahh",
|
{ "/prefs",
|
||||||
|
"------",
|
||||||
|
"List all current user preference settings.",
|
||||||
|
"User preferences are stored at:",
|
||||||
|
"",
|
||||||
|
" ~/.profanity/config",
|
||||||
|
"",
|
||||||
|
"Preference changes made using the various commands take effect immediately,",
|
||||||
|
"you will need to restart Profanity for config file edits to take effect.",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/msg",
|
{ "/msg",
|
||||||
_cmd_msg,
|
_cmd_msg,
|
||||||
{ "/msg user@host mesg", "Send mesg to user.",
|
{ "/msg user@host mesg", "Send mesg to user.",
|
||||||
{ "Ahh",
|
{ "/msg user@host mesg",
|
||||||
|
"-------------------",
|
||||||
|
"Send a message to the user specified.",
|
||||||
|
"Use tab completion to autocomplete online contacts.",
|
||||||
|
"If there is no current chat with the recipient, a new chat window",
|
||||||
|
"will be opened, and highlighted in the status bar at the bottom.",
|
||||||
|
"pressing the corresponding F key will take you to that window.",
|
||||||
|
"This command can be called from any window, including chat with other users.",
|
||||||
|
"",
|
||||||
|
"Example : /msg boothj5@gmail.com Hey, here's a message!",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/tiny",
|
{ "/tiny",
|
||||||
_cmd_tiny,
|
_cmd_tiny,
|
||||||
{ "/tiny url", "Send url as tinyurl in current chat.",
|
{ "/tiny url", "Send url as tinyurl in current chat.",
|
||||||
{ "Ahh",
|
{ "/tiny url",
|
||||||
|
"---------",
|
||||||
|
"Send the url as a tiny url.",
|
||||||
|
"This command can only be called when in a chat window,",
|
||||||
|
"not from the console.",
|
||||||
|
"",
|
||||||
|
"Example : /tiny http://www.google.com",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/ros",
|
{ "/ros",
|
||||||
_cmd_ros,
|
_cmd_ros,
|
||||||
{ "/ros", "List all contacts.",
|
{ "/ros", "List all contacts.",
|
||||||
{ "Ahh",
|
{ "/ros",
|
||||||
|
"----",
|
||||||
|
"List all contact currently on the chat hosts roster.",
|
||||||
|
"See /who for a more useful list of contacts who are currently online.",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/who",
|
{ "/who",
|
||||||
_cmd_who,
|
_cmd_who,
|
||||||
{ "/who", "Find out who is online.",
|
{ "/who", "Find out who is online.",
|
||||||
{ "Ahh",
|
{ "/who",
|
||||||
|
"----",
|
||||||
|
"Show the list of all online contacts with their current status message.",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/close",
|
{ "/close",
|
||||||
_cmd_close,
|
_cmd_close,
|
||||||
{ "/close", "Close current chat window.",
|
{ "/close", "Close current chat window.",
|
||||||
{ "Ahh",
|
{ "/close",
|
||||||
|
"------",
|
||||||
|
"Close the current chat window, no message is sent to the recipient,",
|
||||||
|
"The chat window will become available for new chats.",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/quit",
|
{ "/quit",
|
||||||
_cmd_quit,
|
_cmd_quit,
|
||||||
{ "/quit", "Quit Profanity.",
|
{ "/quit", "Quit Profanity.",
|
||||||
{ "Ahh",
|
{ "/quit",
|
||||||
|
"-----",
|
||||||
|
"Logout of any current sessions, and quit Profanity.",
|
||||||
NULL } } }
|
NULL } } }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -142,31 +182,69 @@ static struct cmd_t setting_commands[] =
|
|||||||
{ "/beep",
|
{ "/beep",
|
||||||
_cmd_set_beep,
|
_cmd_set_beep,
|
||||||
{ "/beep on|off", "Enable/disable sound notifications.",
|
{ "/beep on|off", "Enable/disable sound notifications.",
|
||||||
{ "Ahh",
|
{ "/beep on|off",
|
||||||
|
"------------",
|
||||||
|
"Switch the terminal bell on or off.",
|
||||||
|
"The bell will sound when incoming messages are received.",
|
||||||
|
"If the terminal does not support sounds, it may attempt to",
|
||||||
|
"flash the screen instead.",
|
||||||
|
"",
|
||||||
|
"Config file section : [ui]",
|
||||||
|
"Config file value : beep=true|false",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/notify",
|
{ "/notify",
|
||||||
_cmd_set_notify,
|
_cmd_set_notify,
|
||||||
{ "/notify on|off", "Enable/disable desktop notifications.",
|
{ "/notify on|off", "Enable/disable desktop notifications.",
|
||||||
{ "Ahh",
|
{ "/notify on|off",
|
||||||
|
"--------------",
|
||||||
|
"Switch the desktop notifications on or off.",
|
||||||
|
"The notification will appear for all incoming messages.",
|
||||||
|
"The desktop environment must support desktop notifications.",
|
||||||
|
"",
|
||||||
|
"Config file section : [ui]",
|
||||||
|
"Config file value : notify=true|false",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/flash",
|
{ "/flash",
|
||||||
_cmd_set_flash,
|
_cmd_set_flash,
|
||||||
{ "/flash on|off", "Enable/disable screen flash notifications.",
|
{ "/flash on|off", "Enable/disable screen flash notifications.",
|
||||||
{ "Ahh",
|
{ "/flash on|off",
|
||||||
|
"-------------",
|
||||||
|
"Make the terminal flash when incoming messages are recieved.",
|
||||||
|
"The flash will only occur if you are not in the chat window associated",
|
||||||
|
"with the user sending the message.",
|
||||||
|
"The terminal must support flashing, if it doesn't it may attempt to beep.",
|
||||||
|
"",
|
||||||
|
"Config file section : [ui]",
|
||||||
|
"Config file value : flash=true|false",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/showsplash",
|
{ "/showsplash",
|
||||||
_cmd_set_showsplash,
|
_cmd_set_showsplash,
|
||||||
{ "/showsplash on|off", "Enable/disable splash logo on startup.",
|
{ "/showsplash on|off", "Enable/disable splash logo on startup.",
|
||||||
{ "Ahh",
|
{ "/showsplash on|off",
|
||||||
|
"------------------",
|
||||||
|
"Switch on or off the ascii logo on start up.",
|
||||||
|
"",
|
||||||
|
"Config file section : [ui]",
|
||||||
|
"Config file value : showsplash=true|false",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/chlog",
|
{ "/chlog",
|
||||||
_cmd_set_chlog,
|
_cmd_set_chlog,
|
||||||
{ "/chlog on|off", "Enable/disable chat logging.",
|
{ "/chlog on|off", "Enable/disable chat logging.",
|
||||||
{ "Ahh",
|
{ "/chlog on|off",
|
||||||
|
"-------------",
|
||||||
|
"Switch chat logging on or off.",
|
||||||
|
"Chat logs are stored in the ~/.profanoty/log directory.",
|
||||||
|
"A folder is created for each login that you have used with Profanity.",
|
||||||
|
"Within in those folders, a log file is created for each user you chat to.",
|
||||||
|
"",
|
||||||
|
"For example if you are logged in as someuser@chatserv.com, and you chat",
|
||||||
|
"to myfriend@chatserv.com, the following chat log will be created:",
|
||||||
|
"",
|
||||||
|
" ~/.profanity/log/someuser_at_chatserv.com/myfriend_at_chatserv.com",
|
||||||
NULL } } }
|
NULL } } }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -175,32 +253,60 @@ static struct cmd_t status_commands[] =
|
|||||||
{ "/away",
|
{ "/away",
|
||||||
_cmd_away,
|
_cmd_away,
|
||||||
{ "/away [msg]", "Set status to away.",
|
{ "/away [msg]", "Set status to away.",
|
||||||
{ "Ahh",
|
{ "/away [msg]",
|
||||||
|
"-----------",
|
||||||
|
"Set your status to \"away\" with the optional message.",
|
||||||
|
"Your current status can be found in the top right of the screen.",
|
||||||
|
"",
|
||||||
|
"Example : /away Gone for lunch",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/chat",
|
{ "/chat",
|
||||||
_cmd_chat,
|
_cmd_chat,
|
||||||
{ "/chat [msg]", "Set status to chat (available for chat).",
|
{ "/chat [msg]", "Set status to chat (available for chat).",
|
||||||
{ "Ahh",
|
{ "/chat [msg]",
|
||||||
|
"-----------",
|
||||||
|
"Set your status to \"chat\", meaning \"available for chat\",",
|
||||||
|
"with the optional message.",
|
||||||
|
"Your current status can be found in the top right of the screen.",
|
||||||
|
"",
|
||||||
|
"Example : /chat Please talk to me!",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/dnd",
|
{ "/dnd",
|
||||||
_cmd_dnd,
|
_cmd_dnd,
|
||||||
{ "/dnd [msg]", "Set status to dnd (do not disturb.",
|
{ "/dnd [msg]", "Set status to dnd (do not disturb.",
|
||||||
{ "Ahh",
|
{ "/dnd [msg]",
|
||||||
|
"----------",
|
||||||
|
"Set your status to \"dnd\", meaning \"do not disturb\",",
|
||||||
|
"with the optional message.",
|
||||||
|
"Your current status can be found in the top right of the screen.",
|
||||||
|
"",
|
||||||
|
"Example : /dnd I'm in the zone",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/online",
|
{ "/online",
|
||||||
_cmd_online,
|
_cmd_online,
|
||||||
{ "/online [msg]", "Set status to online.",
|
{ "/online [msg]", "Set status to online.",
|
||||||
{ "Ahh",
|
{ "/online [msg]",
|
||||||
|
"-------------",
|
||||||
|
"Set your status to \"online\" with the optional message.",
|
||||||
|
"Your current status can be found in the top right of the screen.",
|
||||||
|
"",
|
||||||
|
"Example : /online Up the Irons!",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/xa",
|
{ "/xa",
|
||||||
_cmd_xa,
|
_cmd_xa,
|
||||||
{ "/xa [msg]", "Set status to xa (extended away).",
|
{ "/xa [msg]", "Set status to xa (extended away).",
|
||||||
{ "Ahh",
|
{ "/xa [msg]",
|
||||||
NULL } } }
|
"---------",
|
||||||
|
"Set your status to \"xa\", meaning \"extended away\",",
|
||||||
|
"with the optional message.",
|
||||||
|
"Your current status can be found in the top right of the screen.",
|
||||||
|
"",
|
||||||
|
"Example : /xa This meeting is going to be a long one",
|
||||||
|
NULL } } },
|
||||||
};
|
};
|
||||||
|
|
||||||
static PAutocomplete commands_ac;
|
static PAutocomplete commands_ac;
|
||||||
|
Loading…
Reference in New Issue
Block a user