Skip to content

Commit

Permalink
Allow specifying multiple namespaces at once
Browse files Browse the repository at this point in the history
  • Loading branch information
sorah committed Jun 6, 2014
1 parent a635b35 commit 3c1a87f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions envchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,15 +513,19 @@ envchain_exec(int argc, const char **argv)
{
if (argc < 2) envchain_abort_with_help();

const char *name, *exe;
const char *name, *names, *exe;
char **args;

name = argv[0];
names = argv[0];
exe = argv[1];
argv++; argc--;
argv++; argc--;

envchain_search_values(name, &envchain_exec_value_callback, NULL);
name = strtok((char*)names, ",");
while (name) {
envchain_search_values(name, &envchain_exec_value_callback, NULL);
name = strtok(NULL, ",");
}

int len = (2+argc);
args = malloc(sizeof(char*) * len);
Expand Down

0 comments on commit 3c1a87f

Please sign in to comment.