Changeset f1e629d for commands.c
- Timestamp:
- Jul 6, 2003, 6:42:06 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 5d9c664
- Parents:
- 675ce49
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
commands.c
r6873455 rf1e629d 101 101 "Use 'show keymaps' to see the existing keymaps.\n" 102 102 "Key sequences may be things like M-C-t or NPAGE.\n"), 103 104 OWLCMD_ARGS("style", owl_command_style, OWL_CTX_ANY, 105 "creates a new style", 106 "style <name> perl <function_name>", 107 "Creates a new style for formatting messages.\n" 108 "A style named <name> will be created that will\n" 109 "format messages using the perl function <function_name>.\n\n" 110 "SEE ALSO: show styles, view -s, filter -s\n"), 103 111 104 112 OWLCMD_ARGS("zwrite", owl_command_zwrite, OWL_CTX_INTERACTIVE, … … 567 575 "show subscriptions\n" 568 576 "show zpunts\n" 577 "show styles\n" 569 578 "show colors\n" 570 579 "show terminal\n" … … 583 592 "Show commands will list the names of all keymaps.\n" 584 593 "Show command <command> will provide information about a command.\n\n" 594 "Show styles will list the names of all styles available\n" 595 "for formatting messages.\n\n" 585 596 "Show variables will list the names of all variables.\n\n" 586 597 "SEE ALSO: filter, view, alias, bindkey, help\n"), … … 1413 1424 1414 1425 if (argc < 5 || strcmp(argv[3], "command")) { 1415 owl_function_makemsg("Usage: bindkey <keymap> <binding> command <cmd>" , argv[3], argc);1426 owl_function_makemsg("Usage: bindkey <keymap> <binding> command <cmd>"); 1416 1427 return NULL; 1417 1428 } … … 1430 1441 return NULL; 1431 1442 } 1443 1444 char *owl_command_style(int argc, char **argv, char *buff) { 1445 owl_style *s; 1446 1447 /* Usage: style <name> perl <function> */ 1448 if (argc != 4 || strcmp(argv[2], "perl")) { 1449 owl_function_makemsg("Usage: style <name> perl <function>"); 1450 return NULL; 1451 } 1452 if (!owl_perlconfig_is_function(argv[3])) { 1453 owl_function_makemsg("Unable to create style '%s': no perl function '%s'", 1454 argv[1], argv[3]); 1455 return NULL; 1456 } 1457 s=owl_malloc(sizeof(owl_style)); 1458 owl_style_create_perl(s, argv[1], argv[3], NULL); 1459 owl_global_add_style(&g, s); 1460 1461 return NULL; 1462 } 1463 1432 1464 1433 1465 void owl_command_quit() … … 1864 1896 } else if (!strcmp(argv[1], "colors")) { 1865 1897 owl_function_show_colors(); 1898 } else if (!strcmp(argv[1], "styles")) { 1899 owl_function_show_styles(); 1866 1900 } else if (!strcmp(argv[1], "subs") || !strcmp(argv[1], "subscriptions")) { 1867 1901 owl_function_getsubs(); … … 2115 2149 if (argc==2) { 2116 2150 owl_global_set_buffercommand(&g, buff); 2117 owl_function_start_password(" Password: ");2151 owl_function_start_password("AIM Password: "); 2118 2152 return(NULL); 2119 2153 }
Note: See TracChangeset
for help on using the changeset viewer.