mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2024-05-11 05:55:17 +00:00 
			
		
		
		
	fix(osx): only run Preview.app in man-preview if man page exists (#10222)
				
					
				
			This commit is contained in:
		@@ -219,7 +219,8 @@ function quick-look() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function man-preview() {
 | 
			
		||||
  man -t "$@" | open -f -a Preview
 | 
			
		||||
  # Don't let Preview.app steal focus if the man page doesn't exist
 | 
			
		||||
  man -w "$@" &>/dev/null && man -t "$@" | open -f -a Preview || man "$@"
 | 
			
		||||
}
 | 
			
		||||
compdef _man man-preview
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user