bash now with more diff-so-fancy
This commit is contained in:
		
							parent
							
								
									67c7c94ace
								
							
						
					
					
						commit
						0eb19bb939
					
				
					 2 changed files with 15 additions and 1 deletions
				
			
		
							
								
								
									
										15
									
								
								bashplugins
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								bashplugins
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,5 +1,20 @@
 | 
			
		|||
fuck() { echo 'no, fuck you'; }
 | 
			
		||||
 | 
			
		||||
gdiff() { /usr/bin/git diff --color "$@"; }
 | 
			
		||||
 | 
			
		||||
gdf()
 | 
			
		||||
{
 | 
			
		||||
    local fancydiff='/usr/bin/diff-so-fancy'
 | 
			
		||||
    local githighlight='/usr/share/git/diff-highlight/diff-highlight'
 | 
			
		||||
    if [[ -x ${fancydiff} ]]; then
 | 
			
		||||
        gdiff "$@" | ${fancydiff} | less --tabs=4 -RFX
 | 
			
		||||
    elif [[ -x ${githighlight} ]]; then
 | 
			
		||||
        gdiff "$@" | ${githighlight} | less --tabs=4 -RFX
 | 
			
		||||
    else
 | 
			
		||||
        gdiff "$@"
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
enable_vscripts()
 | 
			
		||||
{
 | 
			
		||||
    local vscripts="${HOME}/vscripts"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue