mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Allow assignments in the export and readonly commands.
This commit is contained in:
parent
ab6526c8b3
commit
f69bfc76fa
10
msh.c
10
msh.c
@ -3331,11 +3331,19 @@ void (*f)();
|
||||
int key;
|
||||
{
|
||||
if (*wp != NULL) {
|
||||
for (; *wp != NULL; wp++)
|
||||
for (; *wp != NULL; wp++) {
|
||||
if (isassign(*wp)) {
|
||||
char *cp;
|
||||
assign(*wp, COPYV);
|
||||
for (cp = *wp; *cp != '='; cp++)
|
||||
;
|
||||
*cp = '\0';
|
||||
}
|
||||
if (checkname(*wp))
|
||||
(*f)(lookup(*wp));
|
||||
else
|
||||
badid(*wp);
|
||||
}
|
||||
} else
|
||||
putvlist(key, 1);
|
||||
}
|
||||
|
10
shell/msh.c
10
shell/msh.c
@ -3331,11 +3331,19 @@ void (*f)();
|
||||
int key;
|
||||
{
|
||||
if (*wp != NULL) {
|
||||
for (; *wp != NULL; wp++)
|
||||
for (; *wp != NULL; wp++) {
|
||||
if (isassign(*wp)) {
|
||||
char *cp;
|
||||
assign(*wp, COPYV);
|
||||
for (cp = *wp; *cp != '='; cp++)
|
||||
;
|
||||
*cp = '\0';
|
||||
}
|
||||
if (checkname(*wp))
|
||||
(*f)(lookup(*wp));
|
||||
else
|
||||
badid(*wp);
|
||||
}
|
||||
} else
|
||||
putvlist(key, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user