mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2024-05-11 05:55:17 +00:00 
			
		
		
		
	In the home directory there is a .terraform folder for modules but it is most likely not an actual directory of terraform scripts. Therefore, this patch disables checking for workspace in the home directory.
		
			
				
	
	
		
			10 lines
		
	
	
		
			275 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			275 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
function tf_prompt_info() {
 | 
						|
    # dont show 'default' workspace in home dir
 | 
						|
    [[ "$PWD" == ~ ]] && return
 | 
						|
    # check if in terraform dir
 | 
						|
    if [ -d .terraform ]; then
 | 
						|
      workspace=$(terraform workspace show 2> /dev/null) || return
 | 
						|
      echo "[${workspace}]"
 | 
						|
    fi
 | 
						|
}
 |