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