add support for conda; i now support two dev frameworky things so lets mention this in the readme too
This commit is contained in:
		@@ -5,4 +5,5 @@
 | 
			
		||||
* Provides a unique syntax for running ssh sessions. You can simply type `command@target-host --args` to run a one shot command on target-host (or `@target-host` to open a full ssh session)
 | 
			
		||||
* Customizes the prompt according to developer's personal preferences (framework for customization coming soon!)
 | 
			
		||||
* Automatically updates itself, and is capable of installing itself with just a stub zshrc
 | 
			
		||||
* Support for some developer environment tools, such as OPAM and conda
 | 
			
		||||
* And more, as needed!
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
#cols=$(stty -a | grep -Po '(?<=columns )\d+' | tr -d "\n")
 | 
			
		||||
cols=$COLUMNS
 | 
			
		||||
 | 
			
		||||
setopt prompt_subst
 | 
			
		||||
 | 
			
		||||
function ticker_message () {
 | 
			
		||||
    if [[ $_zeeshdev_ticker_newlines == 0 ]]; then
 | 
			
		||||
        printf "\r${(l:$cols:: :)A}\r"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										21
									
								
								modules/conda.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								modules/conda.zsh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
# Note: location of conda can be unpredictable; user is expected to
 | 
			
		||||
#       run `conda init zsh` as normal then move resulting .zshrc
 | 
			
		||||
#       modifications to .zshrc.local
 | 
			
		||||
 | 
			
		||||
# recommended settings for .condarc:
 | 
			
		||||
#     auto_assign_base: false
 | 
			
		||||
#     changeps1: false
 | 
			
		||||
 | 
			
		||||
local orig_rprompt="${RPROMPT}"
 | 
			
		||||
 | 
			
		||||
function precmd_conda_prompt() {
 | 
			
		||||
    if [[ -v CONDA_DEFAULT_ENV && "$CONDA_DEFAULT_ENV" != "base" ]]; then
 | 
			
		||||
        RPROMPT="%{$fg[cyan]%}$CONDA_DEFAULT_ENV %{$reset_color%} ${orig_rprompt}"
 | 
			
		||||
    else
 | 
			
		||||
        RPROMPT="${orig_rprompt}"
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if (( ${+commands[conda]} )); then
 | 
			
		||||
    precmd_functions+=precmd_conda_prompt
 | 
			
		||||
fi
 | 
			
		||||
		Reference in New Issue
	
	Block a user