about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index bc1a35f90..ad340afc8 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -1946,7 +1946,7 @@ bin_typeset(char *name, char **argv, char *ops, int func)
     }
 
     if (!(ops['g'] || ops['x'] || ops['m']) || ops['g'] == 2 || *name == 'l' ||
-	!isset(GLOBALEXPORT))
+	(!isset(GLOBALEXPORT) && !ops['g']))
 	on |= PM_LOCAL;
 
     if (on & PM_TIED) {