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