2001-04-02 13:14:23 +02:00
|
|
|
#compdef -k complete-word \C-x?
|
|
|
|
|
2001-05-29 13:59:50 +02:00
|
|
|
eval "$_comp_setup"
|
2001-04-02 13:14:23 +02:00
|
|
|
|
|
|
|
(( $+_debug_count )) || integer -g _debug_count
|
|
|
|
local tmp=${TMPPREFIX}${$}${words[1]:t}$[++_debug_count]
|
2002-01-17 19:49:32 +01:00
|
|
|
local pager w="${(qq)words}"
|
2001-04-02 13:14:23 +02:00
|
|
|
|
|
|
|
exec 3>&- # Too bad if somebody else is using it ...
|
2001-06-21 12:05:19 +02:00
|
|
|
[[ -t 2 ]] && { exec 3>&2 2>| $tmp ; trap 'exec 2>&3 3>&-' EXIT INT }
|
2001-04-02 13:14:23 +02:00
|
|
|
|
|
|
|
setopt xtrace
|
|
|
|
_main_complete
|
|
|
|
integer ret=$?
|
|
|
|
unsetopt xtrace
|
|
|
|
|
|
|
|
[[ -t 3 ]] && {
|
2002-01-17 19:49:32 +01:00
|
|
|
zstyle -s ':completion:complete-debug::::' pager pager
|
|
|
|
print -sR "${pager:-${PAGER:-${VISUAL:-${EDITOR:-more}}}} ${(q)tmp} ;: $w"
|
2001-04-02 13:14:23 +02:00
|
|
|
_message -r "Trace output left in $tmp (up-history to view)"
|
|
|
|
[[ $compstate[nmatches] -le 1 && $compstate[list] != *force* ]] &&
|
|
|
|
compstate[list]='list force messages'
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret
|