[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" |
---|
| 41 | " M-P Move to the preivous personal message\n" |
---|
| 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" |
---|
[65fc0900] | 59 | " V Change to back to home view ('all' by default)\n" |
---|
[6794f72] | 60 | " v Start a view command\n" |
---|
[3895e23] | 61 | " ! Invert the current view\n" |
---|
[6794f72] | 62 | "\n" |
---|
[15283bb] | 63 | " l Print a zephyr/AIM buddy listing\n" |
---|
[6794f72] | 64 | " A Toggle zaway\n" |
---|
[15283bb] | 65 | " o Toggle one-line display mode\n" |
---|
| 66 | " w Open a URL in the current message\n" |
---|
[6794f72] | 67 | " C-l Refresh the screen\n" |
---|
[15283bb] | 68 | " C-z Suspend Owl\n" |
---|
[6794f72] | 69 | " h Print this help message\n" |
---|
[bde7714] | 70 | " : , M-x Enter command mode\n" |
---|
[55faab7] | 71 | "\n" |
---|
| 72 | " / Foward search\n" |
---|
| 73 | " ? Reverse search\n" |
---|
[6794f72] | 74 | "\n\n" |
---|
| 75 | ); |
---|
[7d4fbcd] | 76 | owl_fmtext_append_bold |
---|
[6794f72] | 77 | (&fm, |
---|
| 78 | " Basic Commands:\n" |
---|
| 79 | ); |
---|
[7d4fbcd] | 80 | owl_fmtext_append_normal |
---|
[6794f72] | 81 | (&fm, |
---|
| 82 | " quit, exit Exit owl\n" |
---|
| 83 | " help Get help about commands\n" |
---|
| 84 | " show Show information about owl (see detailed help)\n" |
---|
| 85 | "\n" |
---|
| 86 | " zwrite Send a zephyr\n" |
---|
[15283bb] | 87 | " aimlogin Login to AIM\n" |
---|
| 88 | " aimwrite Send an AIM message\n" |
---|
[6794f72] | 89 | "\n" |
---|
[15283bb] | 90 | " addbuddy Add a zephyr or AIM buddy\n" |
---|
| 91 | " zaway Turn zaway on or off, or set the message\n" |
---|
| 92 | " zlocate Locate a user\n" |
---|
[6794f72] | 93 | " subscribe Subscribe to a zephyr class or instance\n" |
---|
| 94 | " unsubscribe Unsubscribe to a zephyr class or instance\n" |
---|
[15283bb] | 95 | " blist Print a list of zephyr and AIM buddies logged in\n" |
---|
| 96 | " search Search for a text string\n" |
---|
| 97 | "\n" |
---|
| 98 | " set Set a variable (see list below)\n" |
---|
| 99 | " print Print a variable's value (variables listed below)\n" |
---|
| 100 | " startup Set a command to be run at every Owl startup\n" |
---|
| 101 | " unstartup Remove a command to be run at every Owl startup\n" |
---|
| 102 | "\n" |
---|
[6794f72] | 103 | " getsubs Print a list of current subscriptions\n" |
---|
[15283bb] | 104 | " unsuball Unsubscribe from all zephyr classes\n" |
---|
| 105 | " load-subs Load zephyr subscriptions from a file\n" |
---|
| 106 | " zpunt Supress messages from a zephyr triplet\n" |
---|
| 107 | " zlog Send a login or logout notification\n" |
---|
| 108 | " zlist Print a list of zephyr buddies logged in\n" |
---|
| 109 | " alist Print a list of AIM buddies logged in\n" |
---|
[6794f72] | 110 | " info Print detailed information about the current message\n" |
---|
| 111 | " filter Create a message filter\n" |
---|
| 112 | " view View messages matching a filter\n" |
---|
| 113 | " viewuser View messages to or from a particular user\n" |
---|
| 114 | " viewclass View messages to a particular class\n" |
---|
| 115 | " expunge Expunge messages marked for deletion\n" |
---|
[15283bb] | 116 | " bindkey Create a new key binding\n" |
---|
| 117 | " alias Create a command alias\n" |
---|
| 118 | " dump\n" |
---|
[6794f72] | 119 | "\n" |
---|
| 120 | " about Print information about owl\n" |
---|
| 121 | " status Print status information about the running owl\n" |
---|
| 122 | " version Print the version number of owl\n" |
---|
| 123 | "\n"); |
---|
[7d4fbcd] | 124 | |
---|
| 125 | /* help for variables */ |
---|
| 126 | owl_fmtext_append_bold(&fm, |
---|
[6794f72] | 127 | "Variables:\n"); |
---|
[7d4fbcd] | 128 | owl_variable_dict_get_names(owl_global_get_vardict(&g), &varnames); |
---|
| 129 | numvarnames = owl_list_get_size(&varnames); |
---|
| 130 | for (i=0; i<numvarnames; i++) { |
---|
| 131 | varname = owl_list_get_element(&varnames, i); |
---|
| 132 | if (varname && varname[0]!='_') { |
---|
[aa2f33b3] | 133 | owl_variable_describe(owl_global_get_vardict(&g), varname, &fm); |
---|
[7d4fbcd] | 134 | } |
---|
| 135 | } |
---|
| 136 | owl_variable_dict_namelist_free(&varnames); |
---|
| 137 | |
---|
| 138 | owl_fmtext_append_normal(&fm, "\n"); |
---|
| 139 | |
---|
| 140 | owl_function_popless_fmtext(&fm); |
---|
| 141 | |
---|
| 142 | owl_fmtext_free(&fm); |
---|
| 143 | } |
---|