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

Re: PATCH: 3.1.6-pws-11: Completion suggestions + fixes + sorting tags



On Dec 15, 10:09am, Sven Wischnowsky wrote:
} Subject: Re: PATCH: 3.1.6-pws-11: Completion suggestions + fixes + sorting
}
} Peter Stephenson wrote:
} 
} > 2. I don't really like the way ZLS_COLORS is sidelined.  There doesn't seem
} >    to be any point in it if you're using new completion.  Perhaps if it's
} >    set when completion is initialised it could be set to the default for
} >    the list-colors style.
} 
} Hm, my bad English shows... There doesn't seem to be a point in what?

There doesn't seem to be a reason to have a ZLS_COLORS parameter at all.

} > 6. Incremental completion may be missing a few things, for example
} >    a way of switching it off after it's completed a word with tab, it
} >    annoys me that it doesn't, and an option to complete unambiguous bits
} >    automatically.  The function doesn't seem to be described anywhere, but
} >    I think someone already suggested the zle functions needed their own
} >    manual entry.
} 
} Incremental completion is a hack, yes. Have you had a look at
} predict-on lately? It can do completion, too, nowadays.

incremental-complete-word is somewhat vi-like (modal) even though editing
within it is emacs-like.  predict-on is more like an emacs minor mode.
I haven't ever tried combining predict-on with menu-select ...

BTW, predict-on is still using _style as well.  Is this the correct fix?

Index: Functions/Zle/predict-on
===================================================================
@@ -61,7 +61,7 @@
 	  # get out of that `case'.
 	  repeat 1
 	  do
-	    _style -s '' cursor crs
+	    zstyle -s ":completion${curcontext}" cursor crs
 	    case $crs in
 	    (complete)
 	      # At the place where the completion left it, if it is after
@@ -119,7 +119,7 @@
   then
     compstate[list]=''
     compstate[force_list]=yes
-  elif _style '' list always ]]
+  elif zstyle ":completion${curcontext}:predict" list always ]]
   then
     compstate[force_list]=yes
   fi


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



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