Only show hostname when connected via SSH
This commit is contained in:
		
							parent
							
								
									11902b50a6
								
							
						
					
					
						commit
						a0ab13cb8a
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -78,9 +78,13 @@ function print_newline
 | 
			
		|||
function set_prompt_info
 | 
			
		||||
{
 | 
			
		||||
    PS1_NAME="`prompt_colorize -b -f 'magenta' '%n'` "
 | 
			
		||||
    PS1_HOST="at `prompt_colorize -b -f 'red' '%m'` "
 | 
			
		||||
    PS1_CWD="in `prompt_colorize -b -f 'green' '%~'` "
 | 
			
		||||
 | 
			
		||||
    if [[ -n "$SSH_CONNECTION" ]]; then
 | 
			
		||||
        PS1_HOST="at `prompt_colorize -b -f 'red' '%m'` "
 | 
			
		||||
    else
 | 
			
		||||
        PS1_HOST=''
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    vcs_info loquacious
 | 
			
		||||
    [[ -n "$vcs_info_msg_0_" ]] && PS1_REPO="on $vcs_info_msg_0_ "
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue