1 | #include "owl.h" |
---|
2 | #include <string.h> |
---|
3 | |
---|
4 | static const char fileIdent[] = "$Id$"; |
---|
5 | |
---|
6 | void owl_help() |
---|
7 | { |
---|
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 |
---|
15 | (&fm, |
---|
16 | "OWL HELP\n\n"); |
---|
17 | |
---|
18 | owl_fmtext_append_normal |
---|
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"); |
---|
24 | |
---|
25 | owl_fmtext_append_bold |
---|
26 | (&fm, |
---|
27 | " Basic Keys:\n" |
---|
28 | ); |
---|
29 | owl_fmtext_append_normal |
---|
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 previous 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" |
---|
46 | " X Expunge deleted messages and switch to home view\n" |
---|
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" |
---|
52 | " r Reply to the current message\n" |
---|
53 | " R Reply to sender\n" |
---|
54 | " C-r Reply but allow editing of reply line\n" |
---|
55 | "\n" |
---|
56 | " M-n View zephyrs in selected conversation\n" |
---|
57 | " M-N View zephyrs in selected converstaion of instance\n" |
---|
58 | " V Change to back to home view ('all' by default)\n" |
---|
59 | " v Start a view command\n" |
---|
60 | " ! Invert the current view\n" |
---|
61 | "\n" |
---|
62 | " l Print a zephyr/AIM buddy listing\n" |
---|
63 | " A Toggle zaway\n" |
---|
64 | " o Toggle one-line display mode\n" |
---|
65 | " w Open a URL in the current message\n" |
---|
66 | " C-l Refresh the screen\n" |
---|
67 | " C-z Suspend Owl\n" |
---|
68 | " h Print this help message\n" |
---|
69 | " : , M-x Enter command mode\n" |
---|
70 | "\n" |
---|
71 | " / Foward search\n" |
---|
72 | " ? Reverse search\n" |
---|
73 | "\n\n" |
---|
74 | ); |
---|
75 | owl_fmtext_append_bold |
---|
76 | (&fm, |
---|
77 | " Basic Commands:\n" |
---|
78 | ); |
---|
79 | owl_fmtext_append_normal |
---|
80 | (&fm, |
---|
81 | " quit, exit Exit owl\n" |
---|
82 | " help Get help about commands\n" |
---|
83 | " show Show information about owl (see detailed help)\n" |
---|
84 | "\n" |
---|
85 | " zwrite Send a zephyr\n" |
---|
86 | " addbuddy Add a zephyr buddy\n" |
---|
87 | " zaway Turn zaway on or off, or set the message\n" |
---|
88 | " zlocate Locate a user\n" |
---|
89 | " subscribe Subscribe to a zephyr class or instance\n" |
---|
90 | " unsubscribe Unsubscribe to a zephyr class or instance\n" |
---|
91 | " blist Print a list of zephyr buddies logged in\n" |
---|
92 | " search Search for a text string\n" |
---|
93 | "\n" |
---|
94 | " set Set a variable (see list below)\n" |
---|
95 | " print Print a variable's value (variables listed below)\n" |
---|
96 | " startup Set a command to be run at every Owl startup\n" |
---|
97 | " unstartup Remove a command to be run at every Owl startup\n" |
---|
98 | "\n" |
---|
99 | " getsubs Print a list of current subscriptions\n" |
---|
100 | " unsuball Unsubscribe from all zephyr classes\n" |
---|
101 | " load-subs Load zephyr subscriptions from a file\n" |
---|
102 | " zpunt Supress messages from a zephyr triplet\n" |
---|
103 | " zlog Send a login or logout notification\n" |
---|
104 | " zlist Print a list of zephyr buddies logged in\n" |
---|
105 | " info Print detailed information about the current message\n" |
---|
106 | " filter Create a message filter\n" |
---|
107 | " view View messages matching a filter\n" |
---|
108 | " viewuser View messages to or from a particular user\n" |
---|
109 | " viewclass View messages to a particular class\n" |
---|
110 | " expunge Expunge messages marked for deletion\n" |
---|
111 | " bindkey Create a new key binding\n" |
---|
112 | " alias Create a command alias\n" |
---|
113 | " dump Dump messagelist as text to a file\n" |
---|
114 | "\n" |
---|
115 | " about Print information about owl\n" |
---|
116 | " status Print status information about the running owl\n" |
---|
117 | " version Print the version number of owl\n" |
---|
118 | "\n"); |
---|
119 | |
---|
120 | /* help for variables */ |
---|
121 | owl_fmtext_append_bold(&fm, |
---|
122 | "Variables:\n"); |
---|
123 | owl_variable_dict_get_names(owl_global_get_vardict(&g), &varnames); |
---|
124 | numvarnames = owl_list_get_size(&varnames); |
---|
125 | for (i=0; i<numvarnames; i++) { |
---|
126 | varname = owl_list_get_element(&varnames, i); |
---|
127 | if (varname && varname[0]!='_') { |
---|
128 | owl_variable_describe(owl_global_get_vardict(&g), varname, &fm); |
---|
129 | } |
---|
130 | } |
---|
131 | owl_variable_dict_namelist_free(&varnames); |
---|
132 | |
---|
133 | owl_fmtext_append_normal(&fm, "\n"); |
---|
134 | |
---|
135 | owl_function_popless_fmtext(&fm); |
---|
136 | |
---|
137 | owl_fmtext_free(&fm); |
---|
138 | } |
---|