* PATCH: incremental-complete-word
@ 2006-07-29 22:03 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2006-07-29 22:03 UTC (permalink / raw)
To: zsh-workers
This fixes some display bugs that had crept in as the rest of the code
evolved around this, and adds some recommendations for common failure
cases that it's really not possible to fix within the function. It's
unclear to me whether contrib.yo needs to be updated.
There are still some pretty nasty bugs; e.g., if you start incremental
completion in the middle of a word, and then backspace past the point
where incremental completion began, confusing things begin to happen
(which vary depending on zstyles governing completion listings, etc.).
Index: incremental-complete-word
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Functions/Zle/incremental-complete-word,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 incremental-complete-word
--- incremental-complete-word 9 Apr 2001 20:14:12 -0000 1.1.1.1
+++ incremental-complete-word 29 Jul 2006 21:49:15 -0000
@@ -10,6 +10,15 @@
#
# This works only with the new function based completion system.
+# Recommended settings:
+# zstyle ':completion:incremental:*' completer _complete _ignored
+# zstyle :incremental stop-keys $'[\e\C-b\C-f\C-n\C-p\C-u-\C-x]'
+
+# BUGS:
+# The _oldlist completer breaks incremental completion. Use a context-
+# specific completer zstyle as shown above to disable the _oldlist
+# completer in this function.
+
# The main widget function.
incremental-complete-word() {
@@ -52,7 +61,7 @@
state=''
fi
zformat -f pstr "$pmpt" "u:${word}" "s:$state" "n:$num" \
- "l:$toolong" "c:${_lastcomp[completer][2,-1]}"
+ "l:$toolong" "c:${_lastcomp[completer]}"
zle -R "$pstr"
read -k key
@@ -95,7 +104,7 @@
state=''
fi
zformat -f pstr "$pmpt" "u:${word}" "s:$state" "n:$num" \
- "l:$toolong" "c:${_lastcomp[completer][2,-1]}"
+ "l:$toolong" "c:${_lastcomp[completer]}"
zle -R "$pstr"
else
zle -R
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-29 22:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-29 22:03 PATCH: incremental-complete-word Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).