Compare commits

...

2 Commits

Author SHA1 Message Date
Carlo Sala
3fca9c8933
fix(upgrade): check if git is available and working
macOS seems to break dev tools when updating the system. This should
prevent the previous issues. See #11309

Closes #11420
2023-01-03 10:02:05 +01:00
Alastair Rankine
00c37b6991
feat(pipenv): standarize completion generation (#11424)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>

Closes #11423
2023-01-03 09:44:53 +01:00
2 changed files with 14 additions and 6 deletions

View File

@ -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() {

View File

@ -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