about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Core/_parameters2
-rw-r--r--Src/Zle/compcore.c6
-rw-r--r--Src/Zle/zle_tricky.c1
4 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a3719d87..bc5fc9208 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-08-11  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 12592: Completion/Core/_parameters, Src/Zle/compcore.c,
+ 	Src/Zle/zle_tricky.c: fixes for completion in math contexts: don't
+ 	quote spaces and do normal parameter expansion completion after `$'
+	
 2000-08-11  Peter Stephenson  <pws@csr.com>
 
 	* Config/version.mk: 3.1.9-dev-5.
diff --git a/Completion/Core/_parameters b/Completion/Core/_parameters
index 578bf4428..b49d60dda 100644
--- a/Completion/Core/_parameters
+++ b/Completion/Core/_parameters
@@ -12,4 +12,4 @@ pattern=(-g \*)
 zparseopts -D -K -E g:=pattern
 
 _wanted parameters expl parameter compadd "$@" \
-    -k "parameters[(R)${pattern[2]}~*local*]"
+   -Q -k "parameters[(R)${pattern[2]}~*local*]"
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 80f558b5e..e2dbe4909 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -664,7 +664,7 @@ callcompfunc(char *s, char *fn)
 	zsfree(compprefix);
 	zsfree(compsuffix);
 	if (unset(COMPLETEINWORD)) {
-	    tmp = multiquote(s, 0);
+	    tmp = (linwhat == IN_MATH ? dupstring(s) : multiquote(s, 0));
 	    untokenize(tmp);
 	    compprefix = ztrdup(tmp);
 	    compsuffix = ztrdup("");
@@ -675,11 +675,11 @@ callcompfunc(char *s, char *fn)
 
 	    sav = *ss;
 	    *ss = '\0';
-	    tmp = multiquote(s, 0);
+	    tmp = (linwhat == IN_MATH ? dupstring(s) : multiquote(s, 0));
 	    untokenize(tmp);
 	    compprefix = ztrdup(tmp);
 	    *ss = sav;
-	    ss = multiquote(ss, 0);
+	    ss = (linwhat == IN_MATH ? dupstring(ss) : multiquote(ss, 0));
 	    untokenize(ss);
 	    compsuffix = ztrdup(ss);
 	}
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index e081b40a1..63978175d 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1311,6 +1311,7 @@ get_comp_string(void)
 	    } else
 		insubscr = 1;
 	}
+	parse_subst_string(s);
     }
     /* This variable will hold the current word in quoted form. */
     qword = ztrdup(s);