source: help.c @ 055e366

release-1.10release-1.8release-1.9
Last change on this file since 055e366 was 820e852, checked in by Jason Gross <jgross@mit.edu>, 13 years ago
Make help show the correct keybinding for A c65d81ed60fefed19f5e607c975771b10bcb62bd neglected to update help.c
  • Property mode set to 100644
File size: 6.0 KB
Line 
1#include "owl.h"
2#include <string.h>
3
4void owl_help(void)
5{
6  const owl_variable *v;
7  owl_fmtext fm;
8  const char *varname;
9  GPtrArray *varnames;
10  int i;
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     "  If you're new to BarnOwl, the first thing you should type is\n\n"
20     "    :show quickstart\n\n"
21     "  For help on a specific command use 'help <command>'\n"
22     "  For information on advanced keys, use 'show keymaps'.\n"
23     "  For information on advanced commands, use 'show commands'.\n"
24     "  For information on variables, use 'show variables'.\n\n");
25
26  owl_fmtext_append_bold
27    (&fm, 
28     "  Basic Keys:\n"
29     );
30  owl_fmtext_append_normal
31    (&fm, 
32     "    n             Move to next non-deleted message\n"
33     "    p             Move to previous non-deleted message\n"
34     "    C-n , down    Move to next message\n"
35     "    C-p , up      Move to previous message\n"
36     "    < , >         Move to first, last message\n"
37     "    right , left  Scroll screen left or right\n"
38     "    C-v           Page down\n"
39     "    M-v           Page up\n"
40     "    i             Print more information about a message\n"
41     "    P             Move to the next personal message\n"
42     "    M-P           Move to the previous personal message\n"
43     "    C-space       Move the mark (asterisk) to the current message\n"
44     "    C-x C-x       Move the mark to the current message while moving to previous mark\n"
45     "\n"
46     "    d             Mark message for deletion\n"
47     "    u             Undelete a message marked for deletion\n"
48     "    x             Expunge deleted messages\n"
49     "    X             Expunge deleted messages and switch to home view\n"
50     "    T             Mark all 'trash' messages for deletion\n"
51     "    M-D           Mark all messages in current view for deletion\n"
52     "    M-u           Unmark all messages in the current view for deletion\n"
53     "\n"
54     "    z             Start a zwrite command\n"
55     "    a             Start an aimwrite command\n"
56     "    r             Reply to the current message\n"
57     "    R             Reply to sender\n"
58     "    C-r           Reply but allow editing of reply line\n"
59     "\n"
60     "    M-n           View zephyrs in selected conversation\n"
61     "    M-N           View zephyrs in selected conversation of instance\n"
62     "    M-p           View only personal zephyrs\n"
63     "    V             Change to back to home view ('all' by default)\n"
64     "    v             Start a view command\n"
65     "    !             Invert the current view\n"
66     "\n"
67     "    l             Print a zephyr/AIM buddy listing\n"
68     "    A             Toggle away\n"
69     "    o             Toggle one-line display mode\n"
70     "    w             Open a URL in the current message\n"
71     "    C-l           Refresh the screen\n"
72     "    C-z           Suspend BarnOwl\n"
73     "    h             Print this help message\n"
74     "    : , M-x       Enter command mode\n"
75     "\n"
76     "    /             Foward search\n"
77     "    ?             Reverse search\n"
78     "\n\n"
79     );
80  owl_fmtext_append_bold
81    (&fm, 
82     "  Basic Commands:\n"
83     );
84  owl_fmtext_append_normal
85    (&fm, 
86     "    quit, exit    Exit BarnOwl\n"
87     "    help          Get help about commands\n"
88     "    show          Show information about BarnOwl (see detailed help)\n"
89     "\n"
90     "    zwrite        Send a zephyr\n"
91     "    aimlogin      Login to AIM\n"
92     "    aimwrite      Send an AIM message\n"
93     "\n"
94     "    addbuddy      Add a zephyr or AIM buddy\n"
95     "    zaway         Turn zaway on or off, or set the message\n"
96     "    zlocate       Locate a user\n"
97     "    subscribe     Subscribe to a zephyr class or instance\n"
98     "    unsubscribe   Unsubscribe to a zephyr class or instance\n"
99     "    blist         Print a list of zephyr and AIM buddies logged in\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     "    startup       Set a command to be run at every BarnOwl startup\n"
105     "    unstartup     Remove a command to be run at every BarnOwl startup\n"
106     "\n"
107     "    getsubs       Print a list of current subscriptions\n"
108     "    unsuball      Unsubscribe from all zephyr classes\n"
109     "    load-subs     Load zephyr subscriptions from a file\n"
110     "    zpunt         Supress messages from a zephyr triplet\n"
111     "    zlog          Send a login or logout notification\n"
112     "    zlist         Print a list of zephyr buddies logged in\n"
113     "    alist         Print a list of AIM buddies logged in\n"
114     "    info          Print detailed information about the current message\n"
115     "    filter        Create a message filter\n"
116     "    view          View messages matching a filter\n"
117     "    viewuser      View messages to or from a particular user\n"
118     "    viewclass     View messages to a particular class\n"
119     "    expunge       Expunge messages marked for deletion\n"
120     "    bindkey       Create a new key binding\n"
121     "    alias         Create a command alias\n"
122     "    dump          Dump messagelist as text to a file\n"
123     "\n"
124     "    about         Print information about BarnOwl\n"
125     "    status        Print status information about the running BarnOwl\n"
126     "    version       Print the version number of BarnOwl\n"
127     "\n");
128 
129  /* help for variables */
130  owl_fmtext_append_bold(&fm, 
131                         "Variables:\n");
132  varnames = owl_variable_dict_get_names(owl_global_get_vardict(&g));
133  for (i = 0; i < varnames->len; i++) {
134    varname = varnames->pdata[i];
135    if (varname && varname[0]!='_') {
136      v = owl_variable_get_var(owl_global_get_vardict(&g), varname);
137      owl_variable_describe(v, &fm);
138    }
139  }
140  owl_ptr_array_free(varnames, g_free);
141
142  owl_fmtext_append_normal(&fm, "\n");
143
144  owl_function_popless_fmtext(&fm);
145
146  owl_fmtext_cleanup(&fm);
147}
Note: See TracBrowser for help on using the repository browser.