mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 21:31:19 +08:00 
			
		
		
		
	fix(misc): only set PAGER if less or more are available (#12060)
				
					
				
			This commit is contained in:
		
							parent
							
								
									e11d813037
								
							
						
					
					
						commit
						7e3fdf33ec
					
				@ -19,8 +19,13 @@ setopt multios              # enable redirect to multiple streams: echo >file1 >
 | 
			
		||||
setopt long_list_jobs       # show long list format job notifications
 | 
			
		||||
setopt interactivecomments  # recognize comments
 | 
			
		||||
 | 
			
		||||
env_default 'PAGER' 'less'
 | 
			
		||||
env_default 'LESS' '-R'
 | 
			
		||||
# define pager dependant on what is available (less or more)
 | 
			
		||||
if (( ${+commands[less]} )); then
 | 
			
		||||
  env_default 'PAGER' 'less'
 | 
			
		||||
  env_default 'LESS' '-R'
 | 
			
		||||
elif (( ${+commands[more]} )); then
 | 
			
		||||
  env_default 'PAGER' 'more'
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
## super user alias
 | 
			
		||||
alias _='sudo '
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user