[BACK]Return to cmd-show-options.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-show-options.c between version 1.14 and 1.15

version 1.14, 2011/04/05 19:37:01 version 1.15, 2012/02/25 12:57:42
Line 31 
Line 31 
   
 const struct cmd_entry cmd_show_options_entry = {  const struct cmd_entry cmd_show_options_entry = {
         "show-options", "show",          "show-options", "show",
         "gst:w", 0, 0,          "gst:w", 0, 1,
         "[-gsw] [-t target-session|target-window]",          "[-gsw] [-t target-session|target-window] [option]",
         0,          0,
         NULL,          NULL,
         NULL,          NULL,
Line 41 
Line 41 
   
 const struct cmd_entry cmd_show_window_options_entry = {  const struct cmd_entry cmd_show_window_options_entry = {
         "show-window-options", "showw",          "show-window-options", "showw",
         "gt:", 0, 0,          "gt:", 0, 1,
         "[-g] " CMD_TARGET_WINDOW_USAGE,          "[-g] " CMD_TARGET_WINDOW_USAGE " [option]",
         0,          0,
         NULL,          NULL,
         NULL,          NULL,
Line 86 
Line 86 
                 }                  }
         }          }
   
         for (oe = table; oe->name != NULL; oe++) {          if (args->argc != 0) {
                   table = oe = NULL;
                   if (options_table_find(args->argv[0], &table, &oe) != 0) {
                           ctx->error(ctx, "ambiguous option: %s", args->argv[0]);
                           return (-1);
                   }
                   if (oe == NULL) {
                           ctx->error(ctx, "unknown option: %s", args->argv[0]);
                           return (-1);
                   }
                 if ((o = options_find1(oo, oe->name)) == NULL)                  if ((o = options_find1(oo, oe->name)) == NULL)
                         continue;                          return (0);
                 optval = options_table_print_entry(oe, o);                  optval = options_table_print_entry(oe, o);
                 ctx->print(ctx, "%s %s", oe->name, optval);                  ctx->print(ctx, "%s %s", oe->name, optval);
           } else {
                   for (oe = table; oe->name != NULL; oe++) {
                           if ((o = options_find1(oo, oe->name)) == NULL)
                                   continue;
                           optval = options_table_print_entry(oe, o);
                           ctx->print(ctx, "%s %s", oe->name, optval);
                   }
         }          }
   
         return (0);          return (0);

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15