about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-08-15 00:31:24 +0100
committerJames Booth <boothj5@gmail.com>2012-08-15 00:31:24 +0100
commit254866e8b92eae682cf7d28514505f2ddc2296ba (patch)
treee1e24fb4ed265422b2fc5723d0416c692089f3eb /src
parent2f8a53fa35fb631349093ba78274e7f13310276e (diff)
downloadprofani-tty-254866e8b92eae682cf7d28514505f2ddc2296ba.tar.gz
Added individual command help
Diffstat (limited to 'src')
-rw-r--r--src/command.c150
1 files changed, 128 insertions, 22 deletions
diff --git a/src/command.c b/src/command.c
index d5a13af0..358fa85a 100644
--- a/src/command.c
+++ b/src/command.c
@@ -82,58 +82,98 @@ static struct cmd_t main_commands[] =
         _cmd_help, 
         { "/help [command]", "This help, or help on a specific 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.",
-          "/help [command] will give more detailed help on a specific command.",
+          "Example : /help connect",
           NULL } } },
 
     { "/connect", 
         _cmd_connect, 
         { "/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  } } },
     
     { "/prefs", 
         _cmd_prefs, 
         { "/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 } } },
 
     { "/msg", 
         _cmd_msg, 
         { "/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 } } },
 
     { "/tiny", 
         _cmd_tiny, 
         { "/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 } } },
 
     { "/ros", 
         _cmd_ros,
         { "/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 } } },
 
     { "/who", 
         _cmd_who,
         { "/who", "Find out who is online.",
-        { "Ahh",
+        { "/who",
+          "----",
+          "Show the list of all online contacts with their current status message.",
           NULL } } },
 
     { "/close", 
         _cmd_close, 
         { "/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 } } },
 
     { "/quit", 
         _cmd_quit, 
         { "/quit", "Quit Profanity.",
-        { "Ahh",
+        { "/quit",
+          "-----",
+          "Logout of any current sessions, and quit Profanity.",
           NULL } } }
 };
 
@@ -142,31 +182,69 @@ static struct cmd_t setting_commands[] =
     { "/beep",
         _cmd_set_beep,
         { "/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 } } },
 
     { "/notify",
         _cmd_set_notify,
         { "/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 } } },
 
     { "/flash", 
         _cmd_set_flash,
         { "/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 } } },
 
     { "/showsplash", 
         _cmd_set_showsplash, 
         { "/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 } } },
 
     { "/chlog", 
         _cmd_set_chlog,
         { "/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 } } }
 };
 
@@ -175,32 +253,60 @@ static struct cmd_t status_commands[] =
     { "/away",
         _cmd_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 } } },
 
     { "/chat",
         _cmd_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 } } },
 
     { "/dnd",
         _cmd_dnd,
         { "/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 } } },
 
     { "/online", 
         _cmd_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 } } },
 
     { "/xa",
         _cmd_xa,
         { "/xa [msg]", "Set status to xa (extended away).",
-        { "Ahh",
-          NULL } } }
+        { "/xa [msg]",
+          "---------",
+          "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;