[7d4fbcd] | 1 | #include "owl.h" |
---|
| 2 | #include <string.h> |
---|
| 3 | |
---|
[1aee7d9] | 4 | static const char fileIdent[] = "$Id$"; |
---|
| 5 | |
---|
[15283bb] | 6 | void owl_help() |
---|
| 7 | { |
---|
[7d4fbcd] | 8 | owl_fmtext fm; |
---|
| 9 | char *varname; |
---|
| 10 | owl_list varnames; |
---|
| 11 | int i, numvarnames; |
---|
| 12 | |
---|
| 13 | owl_fmtext_init_null(&fm); |
---|
| 14 | owl_fmtext_append_bold |
---|
[6794f72] | 15 | (&fm, |
---|
| 16 | "OWL HELP\n\n"); |
---|
[7d4fbcd] | 17 | |
---|
| 18 | owl_fmtext_append_normal |
---|
[6794f72] | 19 | (&fm, |
---|
| 20 | " For help on a specific command use 'help <command>'\n" |
---|
| 21 | " For information on advanced keys, use 'show keymaps'.\n" |
---|
| 22 | " For information on advanced commands, use 'show commands'.\n" |
---|
| 23 | " For information on variables, use 'show variables'.\n\n"); |
---|
[7d4fbcd] | 24 | |
---|
| 25 | owl_fmtext_append_bold |
---|
[6794f72] | 26 | (&fm, |
---|
| 27 | " Basic Keys:\n" |
---|
| 28 | ); |
---|
[7d4fbcd] | 29 | owl_fmtext_append_normal |
---|
[6794f72] | 30 | (&fm, |
---|
| 31 | " n Move to next non-deleted message\n" |
---|
| 32 | " p Move to previous non-deleted message\n" |
---|
| 33 | " C-n , down Move to next message\n" |
---|
| 34 | " C-p , up Move to previous message\n" |
---|
| 35 | " < , > Move to first, last message\n" |
---|
| 36 | " right , left Scroll screen left or right\n" |
---|
| 37 | " C-v Page down\n" |
---|
| 38 | " M-v Page up\n" |
---|
| 39 | " i Print more information about a message\n" |
---|
| 40 | " P Move to the next personal message\n" |
---|
[ec53338] | 41 | " M-P Move to the previous personal message\n" |
---|
[6794f72] | 42 | "\n" |
---|
| 43 | " d Mark message for deletion\n" |
---|
| 44 | " u Undelete a message marked for deletion\n" |
---|
| 45 | " x Expunge deleted messages\n" |
---|
[15283bb] | 46 | " X Expunge deleted messages and switch to home view\n" |
---|
[6794f72] | 47 | " T Mark all 'trash' messages for deletion\n" |
---|
| 48 | " M-D Mark all messages in current view for deletion\n" |
---|
| 49 | " M-u Unmark all messages in the current view for deletion\n" |
---|
| 50 | "\n" |
---|
| 51 | " z Start a zwrite command\n" |
---|
[15283bb] | 52 | " a Start an aimwrite command\n" |
---|
[6794f72] | 53 | " r Reply to the current message\n" |
---|
| 54 | " R Reply to sender\n" |
---|
| 55 | " C-r Reply but allow editing of reply line\n" |
---|
| 56 | "\n" |
---|
[15283bb] | 57 | " M-n View zephyrs in selected conversation\n" |
---|
| 58 | " M-N View zephyrs in selected converstaion of instance\n" |
---|
[0398d55] | 59 | " M-p View only personal zephyrs\n" |
---|
[65fc0900] | 60 | " V Change to back to home view ('all' by default)\n" |
---|
[6794f72] | 61 | " v Start a view command\n" |
---|
[3895e23] | 62 | " ! Invert the current view\n" |
---|
[6794f72] | 63 | "\n" |
---|
[15283bb] | 64 | " l Print a zephyr/AIM buddy listing\n" |
---|
[6794f72] | 65 | " A Toggle zaway\n" |
---|
[15283bb] | 66 | " o Toggle one-line display mode\n" |
---|
| 67 | " w Open a URL in the current message\n" |
---|
[6794f72] | 68 | " C-l Refresh the screen\n" |
---|
[15283bb] | 69 | " C-z Suspend Owl\n" |
---|
[6794f72] | 70 | " h Print this help message\n" |
---|
[bde7714] | 71 | " : , M-x Enter command mode\n" |
---|
[55faab7] | 72 | "\n" |
---|
| 73 | " / Foward search\n" |
---|
| 74 | " ? Reverse search\n" |
---|
[6794f72] | 75 | "\n\n" |
---|
| 76 | ); |
---|
[7d4fbcd] | 77 | owl_fmtext_append_bold |
---|
[6794f72] | 78 | (&fm, |
---|
| 79 | " Basic Commands:\n" |
---|
| 80 | ); |
---|
[7d4fbcd] | 81 | owl_fmtext_append_normal |
---|
[6794f72] | 82 | (&fm, |
---|
| 83 | " quit, exit Exit owl\n" |
---|
| 84 | " help Get help about commands\n" |
---|
| 85 | " show Show information about owl (see detailed help)\n" |
---|
| 86 | "\n" |
---|
| 87 | " zwrite Send a zephyr\n" |
---|
[15283bb] | 88 | " aimlogin Login to AIM\n" |
---|
| 89 | " aimwrite Send an AIM message\n" |
---|
[6794f72] | 90 | "\n" |
---|
[15283bb] | 91 | " addbuddy Add a zephyr or AIM buddy\n" |
---|
| 92 | " zaway Turn zaway on or off, or set the message\n" |
---|
| 93 | " zlocate Locate a user\n" |
---|
[6794f72] | 94 | " subscribe Subscribe to a zephyr class or instance\n" |
---|
| 95 | " unsubscribe Unsubscribe to a zephyr class or instance\n" |
---|
[15283bb] | 96 | " blist Print a list of zephyr and AIM buddies logged in\n" |
---|
| 97 | " search Search for a text string\n" |
---|
| 98 | "\n" |
---|
| 99 | " set Set a variable (see list below)\n" |
---|
| 100 | " print Print a variable's value (variables listed below)\n" |
---|
| 101 | " startup Set a command to be run at every Owl startup\n" |
---|
| 102 | " unstartup Remove a command to be run at every Owl startup\n" |
---|
| 103 | "\n" |
---|
[6794f72] | 104 | " getsubs Print a list of current subscriptions\n" |
---|
[15283bb] | 105 | " unsuball Unsubscribe from all zephyr classes\n" |
---|
| 106 | " load-subs Load zephyr subscriptions from a file\n" |
---|
| 107 | " zpunt Supress messages from a zephyr triplet\n" |
---|
| 108 | " zlog Send a login or logout notification\n" |
---|
| 109 | " zlist Print a list of zephyr buddies logged in\n" |
---|
| 110 | " alist Print a list of AIM buddies logged in\n" |
---|
[6794f72] | 111 | " info Print detailed information about the current message\n" |
---|
| 112 | " filter Create a message filter\n" |
---|
| 113 | " view View messages matching a filter\n" |
---|
| 114 | " viewuser View messages to or from a particular user\n" |
---|
| 115 | " viewclass View messages to a particular class\n" |
---|
| 116 | " expunge Expunge messages marked for deletion\n" |
---|
[15283bb] | 117 | " bindkey Create a new key binding\n" |
---|
| 118 | " alias Create a command alias\n" |
---|
[ec53338] | 119 | " dump Dump messagelist as text to a file\n" |
---|
[6794f72] | 120 | "\n" |
---|
| 121 | " about Print information about owl\n" |
---|
| 122 | " status Print status information about the running owl\n" |
---|
| 123 | " version Print the version number of owl\n" |
---|
| 124 | "\n"); |
---|
[7d4fbcd] | 125 | |
---|
| 126 | /* help for variables */ |
---|
| 127 | owl_fmtext_append_bold(&fm, |
---|
[6794f72] | 128 | "Variables:\n"); |
---|
[7d4fbcd] | 129 | owl_variable_dict_get_names(owl_global_get_vardict(&g), &varnames); |
---|
| 130 | numvarnames = owl_list_get_size(&varnames); |
---|
| 131 | for (i=0; i<numvarnames; i++) { |
---|
| 132 | varname = owl_list_get_element(&varnames, i); |
---|
| 133 | if (varname && varname[0]!='_') { |
---|
[aa2f33b3] | 134 | owl_variable_describe(owl_global_get_vardict(&g), varname, &fm); |
---|
[7d4fbcd] | 135 | } |
---|
| 136 | } |
---|
| 137 | owl_variable_dict_namelist_free(&varnames); |
---|
| 138 | |
---|
| 139 | owl_fmtext_append_normal(&fm, "\n"); |
---|
| 140 | |
---|
| 141 | owl_function_popless_fmtext(&fm); |
---|
| 142 | |
---|
| 143 | owl_fmtext_free(&fm); |
---|
| 144 | } |
---|