source: help.c @ 7803326

release-1.10release-1.9
Last change on this file since 7803326 was f271129, checked in by Jason Gross <jgross@mit.edu>, 13 years ago
Fix up headers The additions to owl.h and some of the removals were done by Alejandro Sedeño <asedeno@mit.edu> in commit 77a0258b3919468fc9d7f7602588ac427ab36e6c. Notes: * I think owl.c lost the need for sys/time.h when we punted select() in favor of glib's main loop. * We don't actually need to include things like stdarg.h, stdio.h, glib/gstdio.h, glib-object.h. I think they get indirectly included via owl.h and/or glib.h. They're left in (or added in to) the files that use functions/types from them. * I'm not entirely sure what sys/socket.h is doing in message.c. It is there from the initial commit. I suspect it might have had something to do with the call to getnameinfo. message.c compiles without it, but http://pubs.opengroup.org/onlinepubs/009695399/functions/getnameinfo.html suggests that we're supposed to include it? *shrugs* I'm leaving it in, for now. (Rather, I'll leave one copy of the #include in.)
  • Property mode set to 100644
File size: 5.9 KB
Line 
1#include "owl.h"
2
3void owl_help(void)
4{
5  const owl_variable *v;
6  owl_fmtext fm;
7  const char *varname;
8  GPtrArray *varnames;
9  int i;
10
11  owl_fmtext_init_null(&fm);
12  owl_fmtext_append_bold
13    (&fm, 
14     "OWL HELP\n\n");
15
16  owl_fmtext_append_normal
17    (&fm, 
18     "  If you're new to BarnOwl, the first thing you should type is\n\n"
19     "    :show quickstart\n\n"
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     "    C-space       Move the mark (asterisk) to the current message\n"
43     "    C-x C-x       Move the mark to the current message while moving to previous mark\n"
44     "\n"
45     "    d             Mark message for deletion\n"
46     "    u             Undelete a message marked for deletion\n"
47     "    x             Expunge deleted messages\n"
48     "    X             Expunge deleted messages and switch to home view\n"
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"
54     "    a             Start an aimwrite command\n"
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"
59     "    M-n           View zephyrs in selected conversation\n"
60     "    M-N           View zephyrs in selected conversation of instance\n"
61     "    M-p           View only personal zephyrs\n"
62     "    V             Change to back to home view ('all' by default)\n"
63     "    v             Start a view command\n"
64     "    !             Invert the current view\n"
65     "\n"
66     "    l             Print a zephyr/AIM buddy listing\n"
67     "    A             Toggle away\n"
68     "    o             Toggle one-line display mode\n"
69     "    w             Open a URL in the current message\n"
70     "    C-l           Refresh the screen\n"
71     "    C-z           Suspend BarnOwl\n"
72     "    h             Print this help message\n"
73     "    : , M-x       Enter command mode\n"
74     "\n"
75     "    /             Foward search\n"
76     "    ?             Reverse search\n"
77     "\n\n"
78     );
79  owl_fmtext_append_bold
80    (&fm, 
81     "  Basic Commands:\n"
82     );
83  owl_fmtext_append_normal
84    (&fm, 
85     "    quit, exit    Exit BarnOwl\n"
86     "    help          Get help about commands\n"
87     "    show          Show information about BarnOwl (see detailed help)\n"
88     "\n"
89     "    zwrite        Send a zephyr\n"
90     "    aimlogin      Login to AIM\n"
91     "    aimwrite      Send an AIM message\n"
92     "\n"
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"
96     "    subscribe     Subscribe to a zephyr class or instance\n"
97     "    unsubscribe   Unsubscribe to a zephyr class or instance\n"
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 BarnOwl startup\n"
104     "    unstartup     Remove a command to be run at every BarnOwl startup\n"
105     "\n"
106     "    getsubs       Print a list of current subscriptions\n"
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"
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"
119     "    bindkey       Create a new key binding\n"
120     "    alias         Create a command alias\n"
121     "    dump          Dump messagelist as text to a file\n"
122     "\n"
123     "    about         Print information about BarnOwl\n"
124     "    status        Print status information about the running BarnOwl\n"
125     "    version       Print the version number of BarnOwl\n"
126     "\n");
127 
128  /* help for variables */
129  owl_fmtext_append_bold(&fm, 
130                         "Variables:\n");
131  varnames = owl_variable_dict_get_names(owl_global_get_vardict(&g));
132  for (i = 0; i < varnames->len; i++) {
133    varname = varnames->pdata[i];
134    if (varname && varname[0]!='_') {
135      v = owl_variable_get_var(owl_global_get_vardict(&g), varname);
136      owl_variable_describe(v, &fm);
137    }
138  }
139  owl_ptr_array_free(varnames, g_free);
140
141  owl_fmtext_append_normal(&fm, "\n");
142
143  owl_function_popless_fmtext(&fm);
144
145  owl_fmtext_cleanup(&fm);
146}
Note: See TracBrowser for help on using the repository browser.