mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 18:38:00 +00:00
Merge upstream/master
This commit is contained in:
commit
047a898d5d
@ -25,5 +25,6 @@ unsetopt CLOBBER # Do not overwrite existing files with > and >>.
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
|
alias -- -='cd -'
|
||||||
alias d='dirs -v'
|
alias d='dirs -v'
|
||||||
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
||||||
|
@ -8,6 +8,12 @@
|
|||||||
# Indrajit Raychaudhuri <irc@indrajit.com>
|
# Indrajit Raychaudhuri <irc@indrajit.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Options
|
||||||
|
#
|
||||||
|
|
||||||
|
setopt EXTENDED_GLOB
|
||||||
|
|
||||||
# Load dependencies.
|
# Load dependencies.
|
||||||
pmodload 'helper'
|
pmodload 'helper'
|
||||||
|
|
||||||
@ -110,11 +116,11 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \
|
|||||||
# look for plugins of interest. Scanning shell '$path' isn't enough as they
|
# look for plugins of interest. Scanning shell '$path' isn't enough as they
|
||||||
# can exist in 'pyenv' synthesized paths (e.g., '~/.pyenv/plugins') instead.
|
# can exist in 'pyenv' synthesized paths (e.g., '~/.pyenv/plugins') instead.
|
||||||
local -a pyenv_plugins
|
local -a pyenv_plugins
|
||||||
|
local pyenv_virtualenvwrapper_plugin_found
|
||||||
if (( $+commands[pyenv] )); then
|
if (( $+commands[pyenv] )); then
|
||||||
pyenv_plugins=(${(@oM)${(f)"$(pyenv commands --no-sh 2> /dev/null)"}:#virtualenv*})
|
pyenv_plugins=(${(@oM)${(f)"$(pyenv commands --no-sh 2> /dev/null)"}:#virtualenv*})
|
||||||
fi
|
|
||||||
|
|
||||||
# Optionally activate 'virtualenv' plugin when available.
|
# Optionally activate 'virtualenv-init' plugin when available.
|
||||||
if (( $pyenv_plugins[(i)virtualenv-init] <= $#pyenv_plugins )); then
|
if (( $pyenv_plugins[(i)virtualenv-init] <= $#pyenv_plugins )); then
|
||||||
eval "$(pyenv virtualenv-init - zsh)"
|
eval "$(pyenv virtualenv-init - zsh)"
|
||||||
fi
|
fi
|
||||||
@ -122,26 +128,30 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \
|
|||||||
# Optionally activate 'virtualenvwrapper' plugin when available.
|
# Optionally activate 'virtualenvwrapper' plugin when available.
|
||||||
if (( $pyenv_plugins[(i)virtualenvwrapper(_lazy|)] <= $#pyenv_plugins )); then
|
if (( $pyenv_plugins[(i)virtualenvwrapper(_lazy|)] <= $#pyenv_plugins )); then
|
||||||
pyenv "$pyenv_plugins[(R)virtualenvwrapper(_lazy|)]"
|
pyenv "$pyenv_plugins[(R)virtualenvwrapper(_lazy|)]"
|
||||||
|
pyenv_virtualenvwrapper_plugin_found="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset pyenv_plugins
|
unset pyenv_plugins
|
||||||
|
fi
|
||||||
|
|
||||||
else
|
if [[ $pyenv_virtualenvwrapper_plugin_found != "true" ]]; then
|
||||||
# Fallback to 'virtualenvwrapper' without 'pyenv' wrapper if 'python' is
|
# Fallback to standard 'virtualenvwrapper' if 'python' is available in '$path'.
|
||||||
# available in '$path'.
|
|
||||||
if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $#commands[(i)python[23]#] )); then
|
if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $#commands[(i)python[23]#] )); then
|
||||||
VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[23]#]
|
VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[23]#]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
virtenv_sources=(
|
virtualenvwrapper_sources=(
|
||||||
${(@Ov)commands[(I)virtualenvwrapper(_lazy|).sh]}
|
${(@Ov)commands[(I)virtualenvwrapper(_lazy|).sh]}
|
||||||
/usr/share/virtualenvwrapper/virtualenvwrapper(_lazy|).sh(OnN)
|
/usr/share/virtualenvwrapper/virtualenvwrapper(_lazy|).sh(OnN)
|
||||||
)
|
)
|
||||||
if (( $#virtenv_sources )); then
|
if (( $#virtualenvwrapper_sources )); then
|
||||||
source "$virtenv_sources[1]"
|
source "$virtualenvwrapper_sources[1]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset virtenv_sources
|
unset virtualenvwrapper_sources
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset pyenv_virtualenvwrapper_plugin_found
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load conda into the shell session, if requested.
|
# Load conda into the shell session, if requested.
|
||||||
|
@ -23,7 +23,7 @@ if ([[ "$TERM_PROGRAM" = 'iTerm.app' ]] && \
|
|||||||
_tmux_iterm_integration='-CC'
|
_tmux_iterm_integration='-CC'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && "$TERM_PROGRAM" != "vscode" ]] && ( \
|
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && "$TERM_PROGRAM" != "vscode" && "$TERMINAL_EMULATOR" != "JetBrains-JediTerm" ]] && ( \
|
||||||
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) ||
|
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) ||
|
||||||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
|
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
|
||||||
); then
|
); then
|
||||||
|
Loading…
Reference in New Issue
Block a user