about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-06-24 03:42:09 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-06-24 03:42:09 +0000
commit2e4a17b32f0298d899dffa8169d6a7b43d7f547b (patch)
tree491041f01d930f0a76fe3e4475bb6f314ec08a82 /Src/Zle
parentf11e227cb010cab274715e7db816d7406dc62c19 (diff)
downloadzsh-2e4a17b32f0298d899dffa8169d6a7b43d7f547b.tar.gz
zsh-2e4a17b32f0298d899dffa8169d6a7b43d7f547b.tar.xz
zsh-2e4a17b32f0298d899dffa8169d6a7b43d7f547b.zip
Change magic-space to respect !".
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_tricky.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 5886b4114..542b50381 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -2241,9 +2241,13 @@ doexpandhist(void)
 int
 magicspace(char **args)
 {
+    char *bangq;
     int ret;
     c = ' ';
-    if (!(ret = selfinsert(args)))
+    for (bangq = (char *)line; (bangq = strchr(bangq, bangchar)); bangq += 2)
+	if (bangq[1] == '"' && (bangq == (char *)line || bangq[-1] != '\\'))
+	    break;
+    if (!(ret = selfinsert(args)) && (!bangq || bangq + 2 > (char *)line + cs))
 	doexpandhist();
     return ret;
 }