Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Completion quirks

> The patch below fixes both of the observed problems with REC_EXACT (one
> of which was present in beta10 and probably earlier betas too).

Much appreciated!  I still observe the wrong "exact" match being appended
when REC_EXACT is set without any menu completion options, but all the
other problems have been solved.  This remaining problem turns out to be
some missing braces on one of the last ifs in domatch().  This problem is
not in the stock beta10 since that if used to have just one statement (it
used commas to do multiple assignments).  I've appended a patch.

Also, thanks for pointing out what rec_exact does -- I've turned it
off.  It was an option I blindly snagged from the example zshrc that
comes with zsh -- perhaps it should be removed to make it less
confusing for new zsh users?

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: zle_tricky.c
@@ -1462,12 +1462,13 @@
 	*fm = t;
 	*sp = 100000;
-    if (!ispattern && (sl = strlen(t)) < *sp)
+    if (!ispattern && (sl = strlen(t)) < *sp) {
 	*sp = sl;
 	if (l == fmatches)
 	    fshortest = t;
 	    shortest = t;
+    }
     if (sav)
 	*e = sav;
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---

Messages sorted by: Reverse Date, Date, Thread, Author