mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 02:49:08 +00:00 
			
		
		
		
	`colordiff` behaves better as `stdin` filter. This is useful in retaining color escape sequences when used with `less`.
		
			
				
	
	
		
			18 lines
		
	
	
		
			266 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			266 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
#
 | 
						|
# Highlights diff output.
 | 
						|
#
 | 
						|
# Authors:
 | 
						|
#   Sorin Ionescu <sorin.ionescu@gmail.com>
 | 
						|
#
 | 
						|
 | 
						|
# function diff {
 | 
						|
 | 
						|
if zstyle -t ':prezto:module:utility:diff' color \
 | 
						|
      && (( $+commands[colordiff] )); then
 | 
						|
  command diff "$@" | colordiff
 | 
						|
else
 | 
						|
  command diff "$@"
 | 
						|
fi
 | 
						|
 | 
						|
# }
 |