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

Completion no longer enabled in zsh -f



I just built 3.1.6-dev-17, patched up through 9589.  Running "zsh -f":

zagzig% ls <TAB>

Nothing happens.

I just fielded a post from somebody on comp.unix.shells who was confused
because zsh didn't complete anything at all for him.  I pointed him at
compinit but said that plain file completion should still work by default,
which at the moment it doesn't.  This must have started happening after
the patch in 8770; you must run at least one "compctl" command or the
like, or "zmodload compctl", for completion to be active.

The following is the simplest fix I could think of; one shortcoming is
that the compctl module doesn't strictly need to be loaded if the complete
module has been.  However, thanks to the way load_module() works, it is
possible to prevent loading of zsh/compctl by loading zsh/zle (either
explicitly or implicitly) in your init files; zsh/zle is already loaded as
a side-effect of "compinit", so for anyone already using new completion in
their init files, this change is invisible.

Index: Src/init.c
===================================================================
@@ -1021,7 +1021,7 @@
 autoload_zleread(char *lp, char *rp, int ha)
 {
     zlereadptr = fallback_zleread;
-    load_module("zsh/zle");
+    load_module("zsh/zle") && load_module("zsh/compctl");
     return zleread(lp, rp, ha);
 }
 

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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