summaryrefslogtreecommitdiffstats
path: root/Functions
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-03 17:22:40 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-03 17:22:40 +0000
commited41dafd3c79ebf2ce390ee9af54fe8bb21deb73 (patch)
treea45e062eb30e19f11c04c8bb7d30e36c1b77eb7e /Functions
parentzsh-workers/9545 (diff)
downloadzsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.gz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.bz2
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.lz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.xz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.zst
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.zip
zsh-workers/9546
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Zle/incremental-complete-word13
-rw-r--r--Functions/Zle/predict-on9
2 files changed, 14 insertions, 8 deletions
diff --git a/Functions/Zle/incremental-complete-word b/Functions/Zle/incremental-complete-word
index e1020d41a..28e8ea7ac 100644
--- a/Functions/Zle/incremental-complete-word
+++ b/Functions/Zle/incremental-complete-word
@@ -18,14 +18,17 @@ incremental-complete-word() {
local key lbuf="$LBUFFER" rbuf="$RBUFFER" pmpt pstr word
local lastl lastr wid twid num alt post toolong
- local curcontext="${curcontext}:incremental" stop brk
+ local curcontext="${curcontext}" stop brk
- zstyle -s ":completion${curcontext}" prompt pmpt ||
+ [[ -z "$curcontext" ]] && curcontext=:::
+ curcontext="${curcontext#*:}incremental:"
+
+ zstyle -s ":completion:${curcontext}" prompt pmpt ||
pmpt='incremental (%c): %u%s %l'
- zstyle -s ":completion${curcontext}" stop stop
- zstyle -s ":completion${curcontext}" break brk
+ zstyle -s ":completion:${curcontext}" stop stop
+ zstyle -s ":completion:${curcontext}" break brk
- if zstyle -t ":completion${curcontext}" list; then
+ if zstyle -t ":completion:${curcontext}" list; then
wid=list-choices
post=( icw-list-helper )
else
diff --git a/Functions/Zle/predict-on b/Functions/Zle/predict-on
index 6e67d5efa..4822c38ce 100644
--- a/Functions/Zle/predict-on
+++ b/Functions/Zle/predict-on
@@ -53,7 +53,10 @@ insert-and-predict () {
unsetopt automenu recexact
integer curs=$CURSOR pos nchar=${#LBUFFER//[^${KEYS[-1]}]}
local -a +h comppostfuncs
- local crs curcontext="${curcontext}:predict"
+ local crs curcontext="${curcontext}"
+
+ [[ -z "$curcontext" ]] && curcontext=:::
+ curcontext="${curcontext#*:}predict:"
comppostfuncs=( predict-limit-list )
zle complete-word
@@ -61,7 +64,7 @@ insert-and-predict () {
# get out of that `case'.
repeat 1
do
- zstyle -s ":completion${curcontext}" 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 +122,7 @@ predict-limit-list() {
then
compstate[list]=''
compstate[force_list]=yes
- elif zstyle -t ":completion:predict${curcontext}" list always
+ elif zstyle -t ":completion:predict::::" list always
then
compstate[force_list]=yes
fi