mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 02:25:28 -07:00
Compare commits
2 Commits
36f1055eee
...
3fca9c8933
Author | SHA1 | Date | |
---|---|---|---|
|
3fca9c8933 | ||
|
00c37b6991 |
@ -1,8 +1,16 @@
|
||||
# Pipenv completion
|
||||
_pipenv() {
|
||||
eval $(env COMMANDLINE="${words[1,$CURRENT]}" _PIPENV_COMPLETE=complete-zsh pipenv)
|
||||
}
|
||||
compdef _pipenv pipenv
|
||||
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" &|
|
||||
|
||||
# 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 -v git &>/dev/null; then
|
||||
|| ! command git --version 2>&1 >/dev/null; then
|
||||
unset update_mode
|
||||
return
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user