mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 06:00:54 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			524 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			524 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #autoload
 | |
| 
 | |
| # Try to ignore the suffix. A bit like e-o-c-prefix.
 | |
| 
 | |
| [[ -n "$SUFFIX" ]] || return 1
 | |
| 
 | |
| local curcontext="${curcontext/:[^:]#:/:prefix-${(M)#_completers[1,_completer_num]:#_prefix}:}" comp i
 | |
| 
 | |
| zstyle -a ":completion:${curcontext}:" completer comp ||
 | |
|   comp=( "${(@)_completers[1,_completer_num][(R)_prefix,-1]}" )
 | |
| 
 | |
| if zstyle -t ":completion:${curcontext}:" add-space; then
 | |
|   ISUFFIX=" $SUFFIX"
 | |
| else
 | |
|   ISUFFIX="$SUFFIX"
 | |
| fi
 | |
| SUFFIX=''
 | |
| 
 | |
| for i in "$comp[@]"; do
 | |
|   [[ "$i" != _prefix ]] && "$i" && return 0
 | |
| done
 | |
| 
 | |
| return 1
 |