about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/utils.c b/Src/utils.c
index cb279983b..b13b2e037 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3075,8 +3075,9 @@ bslashquote(const char *s, char **e, int instring)
 	}
 	else if (ispecial(*u) &&
 		 ((*u != '=' && *u != '~') ||
-		  (u == s || (isset(MAGICEQUALSUBST) &&
-			      (u[-1] == '=' || u[-1] == ':')))) &&
+		  u == s ||
+		  (isset(MAGICEQUALSUBST) && (u[-1] == '=' || u[-1] == ':')) ||
+		  (*u == '~' && isset(EXTENDEDGLOB))) &&
 	    (!instring ||
 	     (isset(BANGHIST) && *u == (char)bangchar) ||
 	     (instring == 2 &&