1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-02-22 08:37:59 +00:00
Jeff Widman e3a9583f33 Support virtualenvwrapper with / without pyenv virtualenv-init or virtualenvwrapper plugins
The desired logic is:

For the `pyenv` plugins `virtualenv-init` and `virtualenvwrapper`:
1. If either plugin is present, activate it
2. If `virtualenvwrapper` plugin is not present, then
   [fallback to standard
   `virtualenvwrapper`](https://github.com/sorin-ionescu/prezto/pull/1414#issuecomment-320306421).
3. If `virtualenvwrapper` plugin is present, then [don't fallback to
   standard `virtualenvwrapper`, regardless of whether `virtualenv-init`
   is
   present](https://github.com/sorin-ionescu/prezto/pull/1981#issue-1123766676).

Previously, if the `virtualenv` command was present but `pyenv` was
missing, then the fallback wouldn't be hit. This bug was introduced by
https://github.com/sorin-ionescu/prezto/pull/1981/ which ensured that
the `pyenv` `virtualenvwrapper` plugin was activated if present,
regardless of the presence of the `virtualenv-init` plugin.

As an optimization, the check for the `pyenv` plugins are skipped if
`pyenv` itself isn't found.

Since we only want to fallback if the `pyenv` `virtualenvwrapper` plugin
is missing, but that's buried within the `pyenv` logic and we also need
to handle when `pyenv` itself is missing, this switches to using a flag
variable.

I also renamed the `virtualenv_sources` var to
`virtualenvwrapper_sources` as `virtualenv` is distinct from
`virtualenvwrapper`, so using one name for a var that is really about
the other is confusing.

Looking at `git blame`, there's a _lot_ of prior art here around trying
to support all the permutations of `pyenv` and various plugins:
* https://github.com/sorin-ionescu/prezto/issues/1413
* https://github.com/sorin-ionescu/prezto/pull/1414
* https://github.com/sorin-ionescu/prezto/pull/1433
* https://github.com/sorin-ionescu/prezto/pull/1434

So we need to be extremely careful to continue to support all these
permutations.

Fix https://github.com/sorin-ionescu/prezto/issues/2022
2022-10-26 22:03:42 -07:00
..
2022-10-25 15:23:59 -07:00
2022-06-14 15:06:05 -05:00

Modules

Load modules in ${ZDOTDIR:-$HOME}/.zpreztorc. The order matters.

zstyle ':prezto:load' pmodule 'environment' 'terminal'

Archive

Provides functions to list and extract archives.

Autosuggestions

Integrates zsh-autosuggestions into Prezto.

Command-Not-Found

Loads the command-not-found tool on macOS or Debian-based distributions.

Completion

Loads and configures TAB completion and provides additional completions from the zsh-completions project.

Directory

Sets directory options and defines directory aliases.

DNF

Defines dnf aliases.

Dpkg

Defines dpkg aliases and functions.

Editor

Sets key bindings.

Emacs

Enables Emacs dependency management.

Environment

Sets general shell options and defines environment variables.

Fasd

Maintains a frequently used file and directory list for fast access.

Git

Enhances the Git distributed version control system by providing aliases, functions and by exposing repository status information to prompts.

GNU Utility

Provides for the interactive use of GNU utilities on non-GNU systems.

GPG

Provides for an easier use of GPG by setting up gpg-agent.

Haskell

Enables local Haskell package installation.

Helper

Provides helper functions for developing modules.

History

Sets history options and defines history aliases.

Integrates zsh-history-substring-search into Prezto.

Homebrew

Defines Homebrew aliases.

MacPorts

Defines MacPorts aliases and adds MacPorts directories to path variables.

Node.js

Provides utility functions for Node.js and loads npm completion.

OCaml

Initializes OCaml package management.

OSX

Defines macOS aliases and functions.

Pacman

Provides aliases and functions for the Pacman package manager and frontends.

Perl

Enables local Perl module installation on macOS and defines alises.

Prompt

Loads prompt themes.

Python

Enables local Python and local Python package installation.

Ruby on Rails

Defines Ruby on Rails aliases.

Rsync

Defines rsync aliases.

Ruby

Configures Ruby local gem installation, loads version managers, and defines aliases.

GNU Screen

Defines GNU Screen aliases and provides for auto launching it at start-up.

Spectrum

Provides for easier use of 256 colors and effects.

SSH

Provides for an easier use of SSH by setting up ssh-agent.

Syntax Highlighting

Integrates zsh-syntax-highlighting into Prezto.

Terminal

Sets terminal window and tab titles.

Tmux

Defines tmux aliases and provides for auto launching it at start-up.

Utility

Defines general aliases and functions.

Wake-on-LAN

This module provides a wrapper around the wakeonlan tool.

Yum

Defines yum aliases.