mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 10:59:08 +00:00 
			
		
		
		
	[Fix #248] Replace virtualenv_info with python-info
Conflicts: modules/python/README.md
This commit is contained in:
		
							
								
								
									
										21
									
								
								modules/python/functions/python-info
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								modules/python/functions/python-info
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
#
 | 
			
		||||
# Displays Python information.
 | 
			
		||||
#
 | 
			
		||||
# Authors:
 | 
			
		||||
#   Sorin Ionescu <sorin.ionescu@gmail.com>
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
local virtualenv_format
 | 
			
		||||
local virtualenv_formatted
 | 
			
		||||
 | 
			
		||||
# Clean up previous $python_info.
 | 
			
		||||
unset python_info
 | 
			
		||||
typeset -gA python_info
 | 
			
		||||
 | 
			
		||||
# Format virtualenv.
 | 
			
		||||
if [[ -n "$VIRTUAL_ENV" ]]; then
 | 
			
		||||
  zstyle -s ':omz:module:python' virtualenv 'virtualenv_format'
 | 
			
		||||
  zformat -f virtualenv_formatted "$virtualenv_format" "v:${VIRTUAL_ENV:t}"
 | 
			
		||||
  python_info[virtualenv]="$virtualenv_formatted"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user