Changes in commands.c [14965e5:d544237]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r14965e5 rd544237 92 92 "Use 'show keymaps' to see the existing keymaps.\n" 93 93 "Key sequences may be things like M-C-t or NPAGE.\n\n" 94 "Ex.: bindkey recv C-b command zwrite -c barnowl" 95 "SEE ALSO: bindkey"), 94 "Ex.: bindkey recv C-b command zwrite -c barnowl\n" 95 "Ex.: bindkey recv m command start-command zwrite -c my-class -i \n\n" 96 "SEE ALSO: unbindkey, start-command"), 96 97 97 98 OWLCMD_ARGS("unbindkey", owl_command_unbindkey, OWL_CTX_ANY, … … 100 101 "Removes a binding of a key sequence within a keymap.\n" 101 102 "Use 'show keymaps' to see the existing keymaps.\n" 102 "Ex.: unbindkey recv H "103 "Ex.: unbindkey recv H\n\n" 103 104 "SEE ALSO: bindkey"), 104 105 105 106 OWLCMD_ARGS("zwrite", owl_command_zwrite, OWL_CTX_INTERACTIVE, 106 107 "send a zephyr", 107 "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opc de] [<user> ...] [-m <message...>]",108 "zwrite [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [<user> ...] [-m <message...>]", 108 109 "Zwrite send a zephyr to the one or more users specified.\n\n" 109 110 "The following options are available:\n\n" … … 137 138 OWLCMD_ARGS("zcrypt", owl_command_zcrypt, OWL_CTX_INTERACTIVE, 138 139 "send an encrypted zephyr", 139 "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opc de] [-m <message...>]\n",140 "zcrypt [-n] [-C] [-c class] [-i instance] [-r realm] [-O opcode] [-m <message...>]\n", 140 141 "Behaves like zwrite but uses encryption. Not for use with\n" 141 142 "personal messages\n"), … … 147 148 "allow editing.\n\n" 148 149 "If 'sender' is specified, reply to the sender.\n\n" 149 "If 'all' or no args are specified, reply public ally to the\n"150 "If 'all' or no args are specified, reply publicly to the\n" 150 151 "same class/instance for non-personal messages and to the\n" 151 152 "sender for personal messages.\n\n" … … 265 266 "zpunt <class> <instance> [recipient]\n" 266 267 "zpunt <instance>", 267 "The zpunt command will sup ress messageto the specified\n"268 "The zpunt command will suppress messages to the specified\n" 268 269 "zephyr triplet. In the second usage messages are suppressed\n" 269 270 "for class MESSAGE and the named instance.\n\n" … … 282 283 "punt <filter-text>", 283 284 "punt <filter-text (multiple words)>\n" 284 "The punt command will sup ress messageto the specified\n"285 "The punt command will suppress messages to the specified\n" 285 286 "filter\n\n" 286 287 "SEE ALSO: unpunt, zpunt, show zpunts\n"), … … 585 586 "name style after the -s argument.\n" 586 587 "\n" 587 "The other usages listed above are abbre ivated forms that simply set\n"588 "The other usages listed above are abbreviated forms that simply set\n" 588 589 "the filter of the current view. The -d option allows you to write a\n" 589 590 "filter expression that will be dynamically created by owl and then\n" … … 593 594 OWLCMD_ARGS("smartnarrow", owl_command_smartnarrow, OWL_CTX_INTERACTIVE, 594 595 "view only messages similar to the current message", 595 "smartnarrow [-i | --instance] [-r | --relat de]",596 "smartnarrow [-i | --instance] [-r | --related]", 596 597 "If the curmsg is a personal message narrow\n" 597 598 " to the conversation with that user.\n" … … 613 614 " message, the filter is to that instance.\n" 614 615 "If the curmsg is a class message, the filter is that class.\n" 615 "If the curmsg is a class message and '-i' is speci ed\n"616 "If the curmsg is a class message and '-i' is specified\n" 616 617 " the filter is to that class and instance.\n"), 617 618 … … 673 674 "for formatting messages.\n\n" 674 675 "Show variables will list the names of all variables.\n\n" 675 "Show errors will show a list of errors e countered by Owl.\n\n"676 "Show errors will show a list of errors encountered by Owl.\n\n" 676 677 "SEE ALSO: filter, view, alias, bindkey, help\n"), 677 678 … … 742 743 "set the search highlight string without searching", 743 744 "setsearch <string>", 744 "The setsearch command highlights all occur ences of its\n"745 "The setsearch command highlights all occurrences of its\n" 745 746 "argument and makes it the default argument for future\n" 746 747 "search commands, but does not move the cursor. With\n" … … 1294 1295 char opt; 1295 1296 int instance = 0, related = 0, i; 1296 c har **tmp_argv = owl_malloc(sizeof(char *) * argc);1297 const char **tmp_argv = owl_malloc(sizeof(char *) * argc); 1297 1298 1298 1299 for (i = 0; i < argc; i++) 1299 tmp_argv[i] = owl_strdup(argv[i]);1300 1301 static struct option options[] = {1300 tmp_argv[i] = argv[i]; 1301 1302 static const struct option options[] = { 1302 1303 {"instance", 0, 0, 'i'}, 1303 1304 {"related", 0, 0, 'r'}, 1304 1305 {NULL, 0, 0, 0}}; 1305 while ((opt = getopt_long(argc, tmp_argv, "ir", options, NULL)) != -1) { 1306 1307 optind = 0; 1308 while ((opt = getopt_long(argc, (char **)tmp_argv, "ir", options, NULL)) != -1) { 1306 1309 switch (opt) { 1307 1310 case 'i': … … 1317 1320 } 1318 1321 1319 for (i = 0; i < argc; i++)1320 owl_free(tmp_argv[i]);1321 owl_free(tmp_argv);1322 1323 1322 filtname = owl_function_smartfilter(instance, related); 1324 1323 … … 1329 1328 1330 1329 done: 1331 optind = 0; /* reset getopt */ 1330 owl_free(tmp_argv); 1331 1332 1332 return NULL; 1333 1333 } … … 1608 1608 char *owl_command_exec(int argc, const char *const *argv, const char *buff) 1609 1609 { 1610 return owl_function_exec(argc, argv, buff, 0);1610 return owl_function_exec(argc, argv, buff, OWL_OUTPUT_RETURN); 1611 1611 } 1612 1612 1613 1613 char *owl_command_pexec(int argc, const char *const *argv, const char *buff) 1614 1614 { 1615 return owl_function_exec(argc, argv, buff, 1);1615 return owl_function_exec(argc, argv, buff, OWL_OUTPUT_POPUP); 1616 1616 } 1617 1617 1618 1618 char *owl_command_aexec(int argc, const char *const *argv, const char *buff) 1619 1619 { 1620 return owl_function_exec(argc, argv, buff, 2);1620 return owl_function_exec(argc, argv, buff, OWL_OUTPUT_ADMINMSG); 1621 1621 } 1622 1622 1623 1623 char *owl_command_perl(int argc, const char *const *argv, const char *buff) 1624 1624 { 1625 return owl_function_perl(argc, argv, buff, 0);1625 return owl_function_perl(argc, argv, buff, OWL_OUTPUT_RETURN); 1626 1626 } 1627 1627 1628 1628 char *owl_command_pperl(int argc, const char *const *argv, const char *buff) 1629 1629 { 1630 return owl_function_perl(argc, argv, buff, 1);1630 return owl_function_perl(argc, argv, buff, OWL_OUTPUT_POPUP); 1631 1631 } 1632 1632 1633 1633 char *owl_command_aperl(int argc, const char *const *argv, const char *buff) 1634 1634 { 1635 return owl_function_perl(argc, argv, buff, 2);1635 return owl_function_perl(argc, argv, buff, OWL_OUTPUT_ADMINMSG); 1636 1636 } 1637 1637
Note: See TracChangeset
for help on using the changeset viewer.