mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 06:00:54 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			724 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			724 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #compdef -k complete-word \C-x?
 | |
| 
 | |
| eval "$_comp_setup"
 | |
| 
 | |
| (( $+_debug_count )) || integer -g _debug_count
 | |
| local tmp=${TMPPREFIX}${$}${words[1]:t}$[++_debug_count]
 | |
| local pager w="${(qq)words}"
 | |
| 
 | |
| exec 3>&-	# Too bad if somebody else is using it ...
 | |
| [[ -t 2 ]] && { exec 3>&2 2>| $tmp ; trap 'exec 2>&3 3>&-' EXIT INT }
 | |
| 
 | |
| setopt xtrace
 | |
| _main_complete
 | |
| integer ret=$?
 | |
| unsetopt xtrace
 | |
| 
 | |
| [[ -t 3 ]] && {
 | |
|     zstyle -s ':completion:complete-debug::::' pager pager
 | |
|     print -sR "${pager:-${PAGER:-${VISUAL:-${EDITOR:-more}}}} ${(q)tmp} ;: $w"
 | |
|     _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
 |