mirror of
				git://git.code.sf.net/p/zsh/code
				synced 2025-10-31 06:00:54 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
	
		
			604 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
	
		
			604 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #compdef bindkey
 | |
| 
 | |
| # Normally, this completes names of zle widgets, whether the builtin ones
 | |
| # or ones defined by the user.  Note that a - allows a wildcard before it,
 | |
| # so h-b-s-b will complete to history-beginning-search-backward.  You
 | |
| # can alter this by removing the -M ... from the second compadd.
 | |
| #
 | |
| # Where appropriate, will complete keymaps instead of widgets.
 | |
| 
 | |
| local expl
 | |
| 
 | |
| if [[ "$words[2]" = -*[DAN]* || "$words[CURRENT-1]" = -*M ]]; then
 | |
|   _description expl keymap
 | |
|   compadd "$expl[@]" - "$keymaps[@]"
 | |
| else
 | |
|   _description expl widget
 | |
|   compadd "$expl[@]" -M 'r:|-=* r:|=*' - "${(@k)widgets}"
 | |
| fi
 |