Support multiple occurances of the same argument. Use this for a new

flag -e to new-window, split-window, respawn-window, respawn-pane to
pass environment variables into the newly created process. From Steffen
Christgau in GitHub issue 1697.
This commit is contained in:
nicm
2019-04-28 20:05:50 +00:00
parent dfb7bb6830
commit c4b0da5513
8 changed files with 192 additions and 63 deletions

4
tmux.h
View File

@ -37,6 +37,7 @@
extern char **environ;
struct args;
struct args_value;
struct client;
struct cmd_find_state;
struct cmdq_item;
@ -1578,6 +1579,7 @@ struct spawn_context {
const char *name;
char **argv;
int argc;
struct environ *environ;
int idx;
const char *cwd;
@ -1871,6 +1873,8 @@ void args_free(struct args *);
char *args_print(struct args *);
int args_has(struct args *, u_char);
const char *args_get(struct args *, u_char);
const char *args_first_value(struct args *, u_char, struct args_value **);
const char *args_next_value(struct args_value **);
long long args_strtonum(struct args *, u_char, long long, long long,
char **);