source: help.c

Last change on this file was 4fd3c04, checked in by Anders Kaseorg <andersk@mit.edu>, 7 years ago
Remove AIM support This code has received almost no security attention, and anyway, AIM is shutting down on December 15, 2017. https://aimemories.tumblr.com/post/166091776077/aimemories Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Property mode set to 100644
File size: 5.7 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     "    r             Reply to the current message\n"
55     "    R             Reply to sender\n"
56     "    C-r           Reply but allow editing of reply line\n"
57     "\n"
58     "    M-n           View zephyrs in selected conversation\n"
59     "    M-N           View zephyrs in selected conversation of instance\n"
60     "    M-p           View only personal zephyrs\n"
61     "    V             Change to back to home view ('all' by default)\n"
62     "    v             Start a view command\n"
63     "    !             Invert the current view\n"
64     "\n"
65     "    l             Print a zephyr buddy listing\n"
66     "    A             Toggle away\n"
67     "    o             Toggle one-line display mode\n"
68     "    w             Open a URL in the current message\n"
69     "    C-l           Refresh the screen\n"
70     "    C-z           Suspend BarnOwl\n"
71     "    h             Print this help message\n"
72     "    : , M-x       Enter command mode\n"
73     "\n"
74     "    /             Forward search\n"
75     "    ?             Reverse search\n"
76     "\n\n"
77     );
78  owl_fmtext_append_bold
79    (&fm, 
80     "  Basic Commands:\n"
81     );
82  owl_fmtext_append_normal
83    (&fm, 
84     "    quit, exit    Exit BarnOwl\n"
85     "    help          Get help about commands\n"
86     "    show          Show information about BarnOwl (see detailed help)\n"
87     "\n"
88     "    zwrite        Send a zephyr\n"
89     "\n"
90     "    addbuddy      Add a zephyr buddy\n"
91     "    zaway         Turn zaway on or off, or set the message\n"
92     "    zlocate       Locate a user\n"
93     "    subscribe     Subscribe to a zephyr class or instance\n"
94     "    unsubscribe   Unsubscribe to a zephyr class or instance\n"
95     "    blist         Print a list of zephyr buddies logged in\n"
96     "    search        Search for a text string\n"
97     "\n"
98     "    set           Set a variable (see list below)\n"
99     "    print         Print a variable's value (variables listed below)\n"
100     "    startup       Set a command to be run at every BarnOwl startup\n"
101     "    unstartup     Remove a command to be run at every BarnOwl startup\n"
102     "\n"
103     "    getsubs       Print a list of current subscriptions\n"
104     "    unsuball      Unsubscribe from all zephyr classes\n"
105     "    load-subs     Load zephyr subscriptions from a file\n"
106     "    zpunt         Suppress messages from a zephyr triplet\n"
107     "    zlog          Send a login or logout notification\n"
108     "    zlist         Print a list of zephyr buddies logged in\n"
109     "    info          Print detailed information about the current message\n"
110     "    filter        Create a message filter\n"
111     "    view          View messages matching a filter\n"
112     "    viewuser      View messages to or from a particular user\n"
113     "    viewclass     View messages to a particular class\n"
114     "    expunge       Expunge messages marked for deletion\n"
115     "    bindkey       Create a new key binding\n"
116     "    alias         Create a command alias\n"
117     "    dump          Dump messagelist as text to a file\n"
118     "\n"
119     "    about         Print information about BarnOwl\n"
120     "    status        Print status information about the running BarnOwl\n"
121     "    version       Print the version number of BarnOwl\n"
122     "\n");
123 
124  /* help for variables */
125  owl_fmtext_append_bold(&fm, 
126                         "Variables:\n");
127  varnames = owl_variable_dict_get_names(owl_global_get_vardict(&g));
128  for (i = 0; i < varnames->len; i++) {
129    varname = varnames->pdata[i];
130    if (varname && varname[0]!='_') {
131      v = owl_variable_get_var(owl_global_get_vardict(&g), varname);
132      owl_variable_describe(v, &fm);
133    }
134  }
135  owl_ptr_array_free(varnames, g_free);
136
137  owl_fmtext_append_normal(&fm, "\n");
138
139  owl_function_popless_fmtext(&fm);
140
141  owl_fmtext_cleanup(&fm);
142}
Note: See TracBrowser for help on using the repository browser.