Changeset f17bff98


Ignore:
Timestamp:
Oct 19, 2003, 11:30:00 PM (21 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
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:
4664c96
Parents:
c15bbfb
Message:
Added the 'show startup' command
Alphebetized 'show' help.
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rc15bbfb rf17bff98  
    332.0.9-pre-4
    44        Added the 'fancylines' variable.
    5         Enabled OWL_STDERR_REDIR by default
     5        Enabled OWL_STDERR_REDIR by default.
     6        Added the 'show startup' command.
    67       
    782.0.9-pre-3
  • commands.c

    rc15bbfb rf17bff98  
    568568
    569569  OWLCMD_ARGS("show", owl_command_show, OWL_CTX_INTERACTIVE,
    570               "show information",
    571               "show variables\n"
    572               "show variable <variable>\n"
     570              "show information\n",
     571              "show colors\n"
     572              "show commands\n"
     573              "show command <command>\n"
     574              "show errors\n"
    573575              "show filters\n"
    574576              "show filter <filter>\n"
    575577              "show keymaps\n"
    576578              "show keymap <keymap>\n"
    577               "show commands\n"
    578               "show command <command>\n"
     579              "show startup\n"
     580              "show status\n"
     581              "show styles\n"
    579582              "show subscriptions / show subs\n"
    580               "show zpunts\n"
    581               "show styles\n"
    582               "show colors\n"
    583583              "show terminal\n"
     584              "show variables\n"
     585              "show variable <variable>\n"
    584586              "show version\n"
    585587              "show view [<view>]\n"
    586               "show status\n"
    587               "show errors\n",
     588              "show zpunts\n",
    588589
    589590              "Show colors will display a list of valid colors for the\n"
     
    592593              "Show filter <filter> will show the definition of a particular\n"
    593594              "     filter.\n\n"
     595              "Show startup will display the custom startup config\n\n"
    594596              "Show zpunts will show the active zpunt filters.\n\n"
    595597              "Show keymaps will list the names of all keymaps.\n"
     
    19231925  } else if (!strcmp(argv[1], "status")) {
    19241926    owl_function_status();
     1927  } else if (!strcmp(argv[1], "startup")) {
     1928    char *filename;
     1929   
     1930    filename=owl_sprintf("%s/%s", owl_global_get_homedir(&g), OWL_STARTUP_FILE);
     1931    owl_function_popless_file(filename);
     1932    owl_free(filename);
    19251933  } else if (!strcmp(argv[1], "errors")) {
    19261934    owl_function_showerrs();
  • functions.c

    rf51bc78 rf17bff98  
    12041204  owl_viewwin_redisplay(v, 0);
    12051205  owl_global_set_needrefresh(&g);
     1206}
     1207
     1208void owl_function_popless_file(char *filename)
     1209{
     1210  owl_fmtext fm;
     1211  FILE *file;
     1212  char buff[1024];
     1213
     1214  file=fopen(filename, "r");
     1215  if (!file) {
     1216    owl_function_error("Could not open file: %s", filename);
     1217    return;
     1218  }
     1219
     1220  owl_fmtext_init_null(&fm);
     1221  while (fgets(buff, 1024, file)) {
     1222    owl_fmtext_append_normal(&fm, buff);
     1223    owl_fmtext_append_normal(&fm, "\n");
     1224  }
     1225
     1226  owl_function_popless_fmtext(&fm);
     1227  owl_fmtext_free(&fm);
     1228  fclose(file);
    12061229}
    12071230
  • owl.h

    rc15bbfb rf17bff98  
    1919static const char owl_h_fileIdent[] = "$Id$";
    2020
    21 #define OWL_VERSION         2.0.9-pre-3
    22 #define OWL_VERSION_STRING "2.0.9-pre-3"
     21#define OWL_VERSION         2.0.9-pre-4
     22#define OWL_VERSION_STRING "2.0.9-pre-4"
    2323
    2424/* Feature that is being tested to redirect stderr through a pipe.
Note: See TracChangeset for help on using the changeset viewer.