From a23aa1a00e7b89b025c3c0684b67fe0fde57cabb Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 1 Mar 2000 13:14:50 +0000 Subject: zsh-workers/9952 --- Test/comptest | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'Test') diff --git a/Test/comptest b/Test/comptest index aae996105..7ea665c26 100644 --- a/Test/comptest +++ b/Test/comptest @@ -20,14 +20,16 @@ done input="$*" -init=\ -'stty columns 80 rows 24 +tmp=/tmp/comptest.$$ + +cat <$tmp +stty columns 80 rows 24 LISTMAX=10000000 -'"ZLS_COLORS='no=:fi=:di=:ln=:pi=:so=:bd=:cd=:ex=:mi=:tc=:sp=:lc=:ec=\n:rc=' +ZLS_COLORS='no=:fi=:di=:ln=:pi=:so=:bd=:cd=:ex=:mi=:tc=:sp=:lc=:ec=\n:rc=' bindkey -e autoload -U compinit compinit $dump -"'zstyle ":completion:*" group-name "" +zstyle ":completion:*" group-name "" zstyle ":completion*:messages" format "%d " zstyle ":completion*:descriptions" format "%d @@ -39,7 +41,7 @@ zmodload zsh/complist expand-or-complete-with-report () { print -lr "" zle expand-or-complete - print -lr - "$LBUFFER" "$RBUFFER" + print -lr - "\$LBUFFER" "\$RBUFFER" zle clear-screen zle -R } @@ -59,19 +61,25 @@ zle -N finish bindkey "^I" expand-or-complete-with-report bindkey "^D" list-choices-with-report bindkey "^Z" finish -'"$code" +$code +End export PS1="" zpty zsh "$zsh" -f zpty -r zsh log "**" -zpty -w zsh "eval ${init:q}" +zpty -w zsh ". $tmp" zpty -r zsh log "**" +rm $tmp zpty -w zsh "$input"$'\C-Z' zpty -r zsh log "**" +if [[ -n "$debug" ]]; then + print -lr - "$log" > /tmp/comptest.debug +fi + logs=(${(s::)log}) shift logs @@ -83,12 +91,12 @@ for log in "$logs[@]"; do log="${log[$mend[1]+1,-1]}" if (( 0 <= $mbegin[2] )); then if [[ $match[2] != TC && $match[3] != \ # ]]; then - print "$match[2]:{$match[3]}" + print -lr "$match[2]:{$match[3]}" fi elif (( 0 <= $mbegin[4] )); then - print "DESCRIPTION:{$match[4]}" + print -lr "DESCRIPTION:{$match[4]}" elif (( 0 <= $mbegin[5] )); then - print "MESSAGE:{$match[5]}" + print -lr "MESSAGE:{$match[5]}" fi done done -- cgit 1.4.1