24 lines
		
	
	
	
		
			551 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			551 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/usr/bin/env zsh
 | 
						|
# Eryn Wells <eryn@erynwells.me>
 | 
						|
 | 
						|
local theme=loquacious
 | 
						|
 | 
						|
autoload -U add-zsh-hook
 | 
						|
autoload -Uz vcs_info
 | 
						|
 | 
						|
zstyle ':vcs_info:*' disable p4 bzr cdv darcs mtn svk tla cvs svn
 | 
						|
zstyle ':vcs_info:*' enable git
 | 
						|
zstyle ':vcs_info:git:general:*' formats '%b'
 | 
						|
zstyle ':vcs_info:git-svn:general:*' formats '%b'
 | 
						|
 | 
						|
# Export the current Git branch before every prompt.
 | 
						|
function export_gitbranch {
 | 
						|
    vcs_info general
 | 
						|
    export gitbranch=${vcs_info_msg_0_}
 | 
						|
}
 | 
						|
 | 
						|
add-zsh-hook precmd export_gitbranch
 | 
						|
 | 
						|
autoload -U promptinit
 | 
						|
promptinit
 | 
						|
prompt $theme
 |