summaryrefslogtreecommitdiffhomepage
path: root/msh.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-07-12 19:39:59 +0000
committerMatt Kraai <kraai@debian.org>2001-07-12 19:39:59 +0000
commitf69bfc76fa7acb0c87fa3f3b319fde361a8315a8 (patch)
tree0cf9a5b952d656fd624785a4f42ac0631ef57471 /msh.c
parentab6526c8b3d0d38bec62b181276380c0533a151d (diff)
Allow assignments in the export and readonly commands.
Diffstat (limited to 'msh.c')
-rw-r--r--msh.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/msh.c b/msh.c
index efba6a1ee..230d74f5a 100644
--- a/msh.c
+++ b/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);
}