source: help.c @ 6a9fbca

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 6a9fbca was c79a047, checked in by Anders Kaseorg <andersk@mit.edu>, 15 years ago
Correctly prototype functions with no parameters as foo(void), not foo(). foo() is a deprecated old-style prototype for a function that takes any arguments. Specifying foo(void) catches more bugs. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 5.8 KB
Line 
1#include "owl.h"
2#include <string.h>
3
4void owl_help(void)
5{
6  owl_fmtext fm;
7  const char *varname;
8  owl_list varnames;
9  int i, numvarnames;
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     "\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     "    a             Start an aimwrite command\n"
53     "    r             Reply to the current message\n"
54     "    R             Reply to sender\n"
55     "    C-r           Reply but allow editing of reply line\n"
56     "\n"
57     "    M-n           View zephyrs in selected conversation\n"
58     "    M-N           View zephyrs in selected conversation of instance\n"
59     "    M-p           View only personal zephyrs\n"
60     "    V             Change to back to home view ('all' by default)\n"
61     "    v             Start a view command\n"
62     "    !             Invert the current view\n"
63     "\n"
64     "    l             Print a zephyr/AIM buddy listing\n"
65     "    A             Toggle zaway\n"
66     "    o             Toggle one-line display mode\n"
67     "    w             Open a URL in the current message\n"
68     "    C-l           Refresh the screen\n"
69     "    C-z           Suspend Owl\n"
70     "    h             Print this help message\n"
71     "    : , M-x       Enter command mode\n"
72     "\n"
73     "    /             Foward search\n"
74     "    ?             Reverse search\n"
75     "\n\n"
76     );
77  owl_fmtext_append_bold
78    (&fm, 
79     "  Basic Commands:\n"
80     );
81  owl_fmtext_append_normal
82    (&fm, 
83     "    quit, exit    Exit owl\n"
84     "    help          Get help about commands\n"
85     "    show          Show information about owl (see detailed help)\n"
86     "\n"
87     "    zwrite        Send a zephyr\n"
88     "    aimlogin      Login to AIM\n"
89     "    aimwrite      Send an AIM message\n"
90     "\n"
91     "    addbuddy      Add a zephyr or AIM buddy\n"
92     "    zaway         Turn zaway on or off, or set the message\n"
93     "    zlocate       Locate a user\n"
94     "    subscribe     Subscribe to a zephyr class or instance\n"
95     "    unsubscribe   Unsubscribe to a zephyr class or instance\n"
96     "    blist         Print a list of zephyr and AIM buddies logged in\n"
97     "    search        Search for a text string\n"
98     "\n"
99     "    set           Set a variable (see list below)\n"
100     "    print         Print a variable's value (variables listed below)\n"
101     "    startup       Set a command to be run at every Owl startup\n"
102     "    unstartup     Remove a command to be run at every Owl startup\n"
103     "\n"
104     "    getsubs       Print a list of current subscriptions\n"
105     "    unsuball      Unsubscribe from all zephyr classes\n"
106     "    load-subs     Load zephyr subscriptions from a file\n"
107     "    zpunt         Supress messages from a zephyr triplet\n"
108     "    zlog          Send a login or logout notification\n"
109     "    zlist         Print a list of zephyr buddies logged in\n"
110     "    alist         Print a list of AIM buddies logged in\n"
111     "    info          Print detailed information about the current message\n"
112     "    filter        Create a message filter\n"
113     "    view          View messages matching a filter\n"
114     "    viewuser      View messages to or from a particular user\n"
115     "    viewclass     View messages to a particular class\n"
116     "    expunge       Expunge messages marked for deletion\n"
117     "    bindkey       Create a new key binding\n"
118     "    alias         Create a command alias\n"
119     "    dump          Dump messagelist as text to a file\n"
120     "\n"
121     "    about         Print information about owl\n"
122     "    status        Print status information about the running owl\n"
123     "    version       Print the version number of owl\n"
124     "\n");
125 
126  /* help for variables */
127  owl_fmtext_append_bold(&fm, 
128                         "Variables:\n");
129  owl_variable_dict_get_names(owl_global_get_vardict(&g), &varnames);
130  numvarnames = owl_list_get_size(&varnames);
131  for (i=0; i<numvarnames; i++) {
132    varname = owl_list_get_element(&varnames, i);
133    if (varname && varname[0]!='_') {
134      owl_variable_describe(owl_global_get_vardict(&g), varname, &fm);
135    }
136  }
137  owl_variable_dict_namelist_free(&varnames);
138
139  owl_fmtext_append_normal(&fm, "\n");
140
141  owl_function_popless_fmtext(&fm);
142
143  owl_fmtext_free(&fm);
144}
Note: See TracBrowser for help on using the repository browser.