mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-11-04 07:21:06 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
	
		
			568 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			568 B
		
	
	
	
		
			Text
		
	
	
	
	
	
#autoload
 | 
						|
 | 
						|
local curcontext="${curcontext/:[^:]#:/:menu:}"
 | 
						|
 | 
						|
# This completer is an example showing how menucompletion can be
 | 
						|
# implemented with the new completion system.
 | 
						|
# Use this one before the normal _complete completer, as in:
 | 
						|
#
 | 
						|
#   zstyle ":completion:::::" completer _menu _complete
 | 
						|
 | 
						|
if [[ -n "$compstate[old_list]" ]]; then
 | 
						|
 | 
						|
  # We have an old list, keep it and insert the next match.
 | 
						|
 | 
						|
  compstate[old_list]=keep
 | 
						|
  compstate[insert]=$((compstate[old_insert]+1))
 | 
						|
else
 | 
						|
  # No old list, make completion insert the first match.
 | 
						|
 | 
						|
  compstate[insert]=1
 | 
						|
fi
 | 
						|
 | 
						|
return 1
 |