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

Diff for /src/usr.bin/tmux/cmd-show-environment.c between version 1.26 and 1.27

version 1.26, 2020/04/13 10:59:58 version 1.27, 2021/08/20 19:50:17
Line 101 
Line 101 
         struct cmd_find_state   *target = cmdq_get_target(item);          struct cmd_find_state   *target = cmdq_get_target(item);
         struct environ          *env;          struct environ          *env;
         struct environ_entry    *envent;          struct environ_entry    *envent;
         const char              *tflag;          const char              *tflag, *name = args_string(args, 0);
   
         if ((tflag = args_get(args, 't')) != NULL) {          if ((tflag = args_get(args, 't')) != NULL) {
                 if (target->s == NULL) {                  if (target->s == NULL) {
Line 124 
Line 124 
                 env = target->s->environ;                  env = target->s->environ;
         }          }
   
         if (args->argc != 0) {          if (name != NULL) {
                 envent = environ_find(env, args->argv[0]);                  envent = environ_find(env, name);
                 if (envent == NULL) {                  if (envent == NULL) {
                         cmdq_error(item, "unknown variable: %s", args->argv[0]);                          cmdq_error(item, "unknown variable: %s", name);
                         return (CMD_RETURN_ERROR);                          return (CMD_RETURN_ERROR);
                 }                  }
                 cmd_show_environment_print(self, item, envent);                  cmd_show_environment_print(self, item, envent);

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27