1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

zsh-3.1.6-dev-20

This commit is contained in:
Tanaka Akira 2000-03-25 00:21:44 +00:00
parent d770c43f14
commit d8f7030273
33 changed files with 802 additions and 302 deletions

View file

@ -1,6 +1,6 @@
DISTFILES_SRC='
.distfiles
prompt_elite2_setup prompt_adam1_setup prompt_fade_setup
prompt_elite2_setup prompt_adam1_setup prompt_bart_setup prompt_fade_setup
prompt_elite_setup prompt_redhat_setup prompt_adam2_setup
prompt_fire_setup prompt_suse_setup prompt_bigfade_setup
prompt_oliver_setup prompt_off_setup prompt_zefram_setup

View file

@ -17,7 +17,7 @@ incremental-complete-word() {
unsetopt autolist menucomplete automenu # doesn't work well
local key lbuf="$LBUFFER" rbuf="$RBUFFER" pmpt pstr word
local lastl lastr wid twid num post toolong
local lastl lastr wid twid num alt post toolong
local curcontext="${curcontext}" stop brk
[[ -z "$curcontext" ]] && curcontext=:::
@ -41,6 +41,10 @@ incremental-complete-word() {
LBUFFER="$lbuf"
RBUFFER="$rbuf"
num=$_lastcomp[nmatches]
if (( ! num )); then
num="${_lastcomp[alternate_nmatches]}"
alt=' -alt-'
fi
if (( ! num )); then
word=''
state='-no match-'
@ -51,7 +55,7 @@ incremental-complete-word() {
word="${_lastcomp[unambiguous]}"
state=''
fi
zformat -f pstr "$pmpt" "u:${word}" "s:$state" "n:$num" \
zformat -f pstr "$pmpt" "u:${word}" "s:$state" "n:$num" "a:$alt" \
"l:$toolong" "c:${_lastcomp[completer][2,-1]}"
zle -R "$pstr"
read -k key
@ -83,6 +87,12 @@ incremental-complete-word() {
LBUFFER="$lastl"
RBUFFER="$lastr"
num=$_lastcomp[nmatches]
if (( ! num )); then
num="${_lastcomp[alternate_nmatches]}"
alt=' -alt-'
else
alt=''
fi
if (( ! num )); then
word=''
state='-no match-'
@ -93,7 +103,7 @@ incremental-complete-word() {
word="${_lastcomp[unambiguous]}"
state=''
fi
zformat -f pstr "$pmpt" "u:${word}" "s:$state" "n:$num" \
zformat -f pstr "$pmpt" "u:${word}" "s:$state" "n:$num" "a:$alt" \
"l:$toolong" "c:${_lastcomp[completer][2,-1]}"
zle -R "$pstr"
read -k key

View file

@ -131,7 +131,7 @@ predict-limit-list() {
then
compstate[list]=''
compstate[force_list]=yes
elif zstyle -t ":completion:::predict::" list always
elif zstyle -t ":completion:predict::::" list always
then
compstate[force_list]=yes
fi