Use proper Git PS1
This commit is contained in:
		
							parent
							
								
									651421be54
								
							
						
					
					
						commit
						17dee6721a
					
				
							
								
								
									
										7
									
								
								_bashrc
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								_bashrc
									
									
									
									
									
								
							@ -25,10 +25,9 @@ shopt -s checkwinsize
 | 
				
			|||||||
# make less more friendly for non-text input files, see lesspipe(1)
 | 
					# make less more friendly for non-text input files, see lesspipe(1)
 | 
				
			||||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
 | 
					[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function git_ps1 {
 | 
					source /usr/share/git/git-prompt.sh
 | 
				
			||||||
  [ -d .git ] && echo -n " [" && git name-rev --name-only @ | tr '\n' ']'
 | 
					export GIT_PS1_SHOWCOLORHINTS=1
 | 
				
			||||||
}
 | 
					PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]`__git_ps1`\$ '
 | 
				
			||||||
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]`git_ps1`\$ '
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# enable color support of ls and also add handy aliases
 | 
					# enable color support of ls and also add handy aliases
 | 
				
			||||||
if [ -x /usr/bin/dircolors ]; then
 | 
					if [ -x /usr/bin/dircolors ]; then
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user