Browse Source

Field cwd.viewid renamed to cwd.vars

Serj Kalichev 6 years ago
parent
commit
cfe0032a67
3 changed files with 5 additions and 5 deletions
  1. 1 1
      clish/shell/private.h
  2. 3 3
      clish/shell/shell_cwd.c
  3. 1 1
      clish/shell/shell_var.c

+ 1 - 1
clish/shell/private.h

@@ -29,7 +29,7 @@ struct clish_shell_file_s {
 typedef struct {
 	char *line;
 	clish_view_t *view;
-	lub_list_t *viewid;
+	lub_list_t *vars;
 	clish_pargv_t *pargv; /* Saved pargv structure */
 	char *cmd; /* Command name without prefix */
 	char *prefix; /* Prefix string if exists */

+ 3 - 3
clish/shell/shell_cwd.c

@@ -19,7 +19,7 @@ void clish_shell__init_cwd(clish_shell_cwd_t *cwd)
 	cwd->prefix = NULL;
 
 	/* Init VARs */
-	cwd->viewid = lub_list_new(clish_var_compare, clish_var_delete);
+	cwd->vars = lub_list_new(clish_var_compare, clish_var_delete);
 }
 
 /*--------------------------------------------------------- */
@@ -33,7 +33,7 @@ void clish_shell__fini_cwd(clish_shell_cwd_t *cwd)
 	clish_pargv_delete(cwd->pargv);
 
 	/* Free VARs  */
-	lub_list_free_all(cwd->viewid);
+	lub_list_free_all(cwd->vars);
 }
 
 /*--------------------------------------------------------- */
@@ -83,7 +83,7 @@ void clish_shell__set_cwd(clish_shell_t *this,
 				newcwd->prefix = lub_string_dupn(full_cmd_name, len - 1);
 		}
 	}
-	clish_shell__expand_viewid(viewid, newcwd->viewid, context);
+	clish_shell__expand_viewid(viewid, newcwd->vars, context);
 	clish_shell__fini_cwd(this->cwdv[index]);
 	free(this->cwdv[index]);
 	this->cwdv[index] = newcwd;

+ 1 - 1
clish/shell/shell_var.c

@@ -206,7 +206,7 @@ static char *find_viewid_var(const char *name, clish_context_t *context)
 	int depth = clish_shell__get_depth(shell);
 	if (depth < 0)
 		return NULL;
-	return find_var(name, shell->cwdv[depth]->viewid, context);
+	return find_var(name, shell->cwdv[depth]->vars, context);
 }
 
 static char * chardiff(const char *syms, const char *minus)