[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.21 and 1.22

version 1.21, 2013/10/10 12:00:23 version 1.22, 2014/04/17 07:43:20
Line 100 
Line 100 
     struct options *oo, int quiet)      struct options *oo, int quiet)
 {  {
         struct args                             *args = self->args;          struct args                             *args = self->args;
           const char                              *name = args->argv[0];
         const struct options_table_entry        *table, *oe;          const struct options_table_entry        *table, *oe;
         struct options_entry                    *o;          struct options_entry                    *o;
         const char                              *optval;          const char                              *optval;
   
         if (*args->argv[0] == '@') {  retry:
                 if ((o = options_find1(oo, args->argv[0])) == NULL) {          if (*name == '@') {
                   if ((o = options_find1(oo, name)) == NULL) {
                         if (quiet)                          if (quiet)
                                 return (CMD_RETURN_NORMAL);                                  return (CMD_RETURN_NORMAL);
                         cmdq_error(cmdq, "unknown option: %s", args->argv[0]);                          cmdq_error(cmdq, "unknown option: %s", name);
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
                 if (args_has(self->args, 'v'))                  if (args_has(self->args, 'v'))
Line 119 
Line 121 
         }          }
   
         table = oe = NULL;          table = oe = NULL;
         if (options_table_find(args->argv[0], &table, &oe) != 0) {          if (options_table_find(name, &table, &oe) != 0) {
                 cmdq_error(cmdq, "ambiguous option: %s", args->argv[0]);                  cmdq_error(cmdq, "ambiguous option: %s", name);
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         }          }
         if (oe == NULL) {          if (oe == NULL) {
                 if (quiet)                  if (quiet)
                     return (CMD_RETURN_NORMAL);                      return (CMD_RETURN_NORMAL);
                 cmdq_error(cmdq, "unknown option: %s", args->argv[0]);                  cmdq_error(cmdq, "unknown option: %s", name);
                 return (CMD_RETURN_ERROR);                  return (CMD_RETURN_ERROR);
         }          }
           if (oe->style != NULL) {
                   name = oe->style;
                   goto retry;
           }
         if ((o = options_find1(oo, oe->name)) == NULL)          if ((o = options_find1(oo, oe->name)) == NULL)
                 return (CMD_RETURN_NORMAL);                  return (CMD_RETURN_NORMAL);
         optval = options_table_print_entry(oe, o, args_has(self->args, 'v'));          optval = options_table_print_entry(oe, o, args_has(self->args, 'v'));
Line 157 
Line 163 
         }          }
   
         for (oe = table; oe->name != NULL; oe++) {          for (oe = table; oe->name != NULL; oe++) {
                   if (oe->style != NULL)
                           continue;
                 if ((o = options_find1(oo, oe->name)) == NULL)                  if ((o = options_find1(oo, oe->name)) == NULL)
                         continue;                          continue;
                 optval = options_table_print_entry(oe, o,                  optval = options_table_print_entry(oe, o,

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22