Add python venvs to prompt
This commit is contained in:
		
							parent
							
								
									dbee7dfed3
								
							
						
					
					
						commit
						6d287ef6d0
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -97,9 +97,11 @@ function setprompt() { | ||||||
| 	[[ -w $PWD ]] && infoline+=( ${pathcolor} ) || infoline+=( ${ropathcolor} ) | 	[[ -w $PWD ]] && infoline+=( ${pathcolor} ) || infoline+=( ${ropathcolor} ) | ||||||
| 	infoline+=( "${PVPREFIX} %(5~|%-1~/.../|)%3~ ${PVSUFFIX}${rpscolor}${PR_HBAR}" ) | 	infoline+=( "${PVPREFIX} %(5~|%-1~/.../|)%3~ ${PVSUFFIX}${rpscolor}${PR_HBAR}" ) | ||||||
| 
 | 
 | ||||||
|  | 	[[ -n "$VIRTUAL_ENV" ]] && infoline+=( "${usercolor}${PVPREFIX}venv: ${VIRTUAL_ENV:t}${PVSUFFIX}${rpscolor}" ) | ||||||
|  | 	[[ -n "$CONDA_DEFAULT_ENV" ]] && infoline+=( "${usercolor}${PVPREFIX}conda: ${CONDA_DEFAULT_ENV}${PVSUFFIX}${rpscolor}" ) | ||||||
|  | 
 | ||||||
| 	# Username & host | 	# Username & host | ||||||
| 	infoline+=( "%(1j.${PVPREFIX} ${gitdirty}Jobs: %j${rpscolor} ${PVSUFFIX}.)" ) | 	infoline+=( "%(1j.${PVPREFIX} ${gitdirty}Jobs: %j${rpscolor} ${PVSUFFIX}.)" ) | ||||||
| 	mod_loaded todo && infoline+=( "$(todo_to_read_info)" ) |  | ||||||
| 	infoline+=( "${PVPREFIX} ${usercolor}%n${reset}@${hostcolor}%m${rpscolor} ${PVSUFFIX}" ) | 	infoline+=( "${PVPREFIX} ${usercolor}%n${reset}@${hostcolor}%m${rpscolor} ${PVSUFFIX}" ) | ||||||
| 
 | 
 | ||||||
| 	i_width=${(S)infoline//\%\{*\%\}} # search-and-replace color escapes | 	i_width=${(S)infoline//\%\{*\%\}} # search-and-replace color escapes | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 crater2150
						crater2150