source: help.c @ a836200

barnowl_perlaimdebianowlrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since a836200 was 55faab7, checked in by James M. Kretchmar <kretch@mit.edu>, 22 years ago
Added search, '/' and '?' to basic help.
  • Property mode set to 100644
File size: 4.9 KB
Line 
1#include "owl.h"
2#include <string.h>
3
4static const char fileIdent[] = "$Id$";
5
6void 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
14    (&fm, 
15     "OWL HELP\n\n");
16
17  owl_fmtext_append_normal
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");
23
24  owl_fmtext_append_bold
25    (&fm, 
26     "  Basic Keys:\n"
27     );
28  owl_fmtext_append_normal
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"
57     "    V             Change to back to home view ('all' by default)\n"
58     "    v             Start a view command\n"
59     "\n"
60     "    l             Print a list of users in .anyone that are logged in\n"
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"
66     "    : , M-x       Enter command mode\n"
67     "\n"
68     "    /             Foward search\n"
69     "    ?             Reverse search\n"
70     "\n\n"
71     );
72  owl_fmtext_append_bold
73    (&fm, 
74     "  Basic Commands:\n"
75     );
76  owl_fmtext_append_normal
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"
91     "    zlist         Print a list of users in .anyone that are logged in\n"
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"
100     "    search        Search for a text string\n"
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");
109 
110  /* help for variables */
111  owl_fmtext_append_bold(&fm, 
112                         "Variables:\n");
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]!='_') {
118      owl_variable_describe(owl_global_get_vardict(&g), varname, &fm);
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}
Note: See TracBrowser for help on using the repository browser.