source: help.c @ af2ca19

barnowl_perlaimdebianowlrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since af2ca19 was aa2f33b3, checked in by Erik Nygren <nygren@mit.edu>, 22 years ago
Variables now have a summary and a long description. Only the summary is shown with help. The long description is shown with "show variable foo". Fix the scrolling bug where we would sometimes fail to scroll the screen down, leaving the current message off the bottom of the screen. Added a 'scrollmode' variable which determines how the screen will scroll as the cursor moves. The default behaves identically to previous versions of owl. The following modes are supported: normal - This is the owl default. Scrolling happens when it needs to, and an attempt is made to keep the current message roughly near the middle of the screen. (default) top - The current message will always be the the top message displayed. neartop - The current message will be one down from the top message displayed, where possible. center - An attempt is made to keep the current message near the center of the screen. paged - The top message displayed only changes when user moves the cursor to the top or bottom of the screen. When it moves, the screen will be paged up or down and the cursor will be near the top or the bottom. pagedcenter - The top message displayed only changes when user moves the cursor to the top or bottom of the screen. When it moves, the screen will be paged up or down and the cursor will be near the center.
  • Property mode set to 100644
File size: 4.6 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             Start a view command\n"
58     "\n"
59     "    A             Toggle zaway\n"
60     "    w             Open a URL in the message in netscape\n"
61     "    C-l           Refresh the screen\n"
62     "    C-z           Suspend\n"
63     "    h             Print this help message\n"
64     "    : , M-x       Enter one of the commands below\n"
65     "\n\n"
66     );
67  owl_fmtext_append_bold
68    (&fm, 
69     "  Basic Commands:\n"
70     );
71  owl_fmtext_append_normal
72    (&fm, 
73     "    quit, exit    Exit owl\n"
74     "    help          Get help about commands\n"
75     "    show          Show information about owl (see detailed help)\n"
76     "\n"
77     "    zwrite        Send a zephyr\n"
78     "    reply         Reply to the current zephyr\n"
79     "\n"
80     "    zlog          Send a login or logout notification\n"
81     "    subscribe     Subscribe to a zephyr class or instance\n"
82     "    unsubscribe   Unsubscribe to a zephyr class or instance\n"
83     "    unsuball      Unsubscribe from all zephyr classes\n"
84     "    getsubs       Print a list of current subscriptions\n"
85     "    zlocate       Locate a user\n"
86     "    info          Print detailed information about the current message\n"
87     "    filter        Create a message filter\n"
88     "    view          View messages matching a filter\n"
89     "    viewuser      View messages to or from a particular user\n"
90     "    viewclass     View messages to a particular class\n"
91     "    expunge       Expunge messages marked for deletion\n"
92     "    zaway         Turn zaway on or off, or set the message\n"
93     "    load-subs     Load zephyr subscriptions from a file\n"
94     "\n"
95     "    set           Set a variable (see list below)\n"
96     "    print         Print a variable's value (variables listed below)\n"
97     "\n"
98     "    about         Print information about owl\n"
99     "    status        Print status information about the running owl\n"
100     "    version       Print the version number of owl\n"
101     "\n");
102 
103  /* help for variables */
104  owl_fmtext_append_bold(&fm, 
105                         "Variables:\n");
106  owl_variable_dict_get_names(owl_global_get_vardict(&g), &varnames);
107  numvarnames = owl_list_get_size(&varnames);
108  for (i=0; i<numvarnames; i++) {
109    varname = owl_list_get_element(&varnames, i);
110    if (varname && varname[0]!='_') {
111      owl_variable_describe(owl_global_get_vardict(&g), varname, &fm);
112    }
113  }
114  owl_variable_dict_namelist_free(&varnames);
115
116  owl_fmtext_append_normal(&fm, "\n");
117
118  owl_function_popless_fmtext(&fm);
119
120  owl_fmtext_free(&fm);
121}
Note: See TracBrowser for help on using the repository browser.