mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 18:46:57 -07:00
Compare commits
No commits in common. "3fca9c8933afc5c118a73cedb171a3c7b8e92730" and "36f1055eeea0f455676381539fcb3e6e0a4da731" have entirely different histories.
3fca9c8933
...
36f1055eee
@ -1,16 +1,8 @@
|
||||
if (( ! $+commands[pipenv] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# If the completion file doesn't exist yet, we need to autoload it and
|
||||
# bind it to `pipenv`. Otherwise, compinit will have already done that.
|
||||
if [[ ! -f "$ZSH_CACHE_DIR/completions/_pipenv" ]]; then
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _pipenv
|
||||
_comps[pipenv]=_pipenv
|
||||
fi
|
||||
|
||||
_PIPENV_COMPLETE=zsh_source pipenv >| "$ZSH_CACHE_DIR/completions/_pipenv" &|
|
||||
# Pipenv completion
|
||||
_pipenv() {
|
||||
eval $(env COMMANDLINE="${words[1,$CURRENT]}" _PIPENV_COMPLETE=complete-zsh pipenv)
|
||||
}
|
||||
compdef _pipenv pipenv
|
||||
|
||||
# Automatic pipenv shell activation/deactivation
|
||||
_togglePipenvShell() {
|
||||
|
@ -24,7 +24,7 @@ zstyle -s ':omz:update' mode update_mode || {
|
||||
# - git is unavailable on the system.
|
||||
if [[ "$update_mode" = disabled ]] \
|
||||
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|
||||
|| ! command git --version 2>&1 >/dev/null; then
|
||||
|| ! command -v git &>/dev/null; then
|
||||
unset update_mode
|
||||
return
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user