mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 21:31:19 +08:00 
			
		
		
		
	history-substring-search: bindkey now checks if terminfo is available first.
This commit is contained in:
		
							parent
							
								
									c563fe95fb
								
							
						
					
					
						commit
						5303793ef1
					
				@ -164,8 +164,12 @@ zle -N history-substring-search-up
 | 
			
		||||
zle -N history-substring-search-down
 | 
			
		||||
 | 
			
		||||
zmodload zsh/terminfo
 | 
			
		||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
 | 
			
		||||
bindkey "$terminfo[kcud1]" history-substring-search-down
 | 
			
		||||
if [[ -n "$terminfo[kcuu1]" ]]; then
 | 
			
		||||
  bindkey "$terminfo[kcuu1]" history-substring-search-up
 | 
			
		||||
fi
 | 
			
		||||
if [[ -n "$terminfo[kcud1]" ]]; then
 | 
			
		||||
  bindkey "$terminfo[kcud1]" history-substring-search-down
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#-----------------------------------------------------------------------------
 | 
			
		||||
# implementation details
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user