prezto/modules
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
..
archive fix: use deflating flag for pixz in unarchive function 2022-04-05 12:29:22 -07:00
autosuggestions autosuggestions: Update zsh-autosuggestions to 0.7.0 2021-07-07 09:56:42 -05:00
command-not-found command-not-found: Detect Homebrew repo internally, not idiomatically 2022-04-08 14:23:51 -05:00
completion completion: Update completion submodule to 0.34.0 2022-08-03 18:51:49 -05:00
directory Add - alias for cd - 2022-10-25 15:23:59 -07:00
dnf general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
docker Update docker compose references 2022-06-14 15:06:05 -05:00
dpkg general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
editor general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
emacs general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
environment general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
fasd general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
git Allow users to set a dirty-branch format 2022-04-01 10:36:35 -07:00
gnu-utility gnu-utility: Add more utility commands and rearrange 2021-05-21 13:33:58 -05:00
gpg general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
haskell general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
helper general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
history fix: heading level for new hist file settings 2022-04-11 11:38:44 -07:00
history-substring-search general: Clarify relative ordering of modules in docs 2021-07-07 09:56:22 -05:00
homebrew general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
macports general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
node node: Cleanup and optimize 'node' module 2021-06-01 21:43:11 -05:00
ocaml general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
osx general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
pacman general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
perl general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
prompt prompt: Update pure submodule to 1.20.1 2022-02-26 13:32:37 -06:00
python Support virtualenvwrapper with / without pyenv virtualenv-init or virtualenvwrapper plugins 2022-10-26 22:03:42 -07:00
rails general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
rsync general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
ruby ruby: Cleanup and optimize 'ruby' module 2021-06-01 14:31:26 -05:00
screen general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
spectrum general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
ssh feat(module/ssh): add globbing for ssh-add param 2022-08-03 18:52:34 -05:00
syntax-highlighting general: Clarify relative ordering of modules in docs 2021-07-07 09:56:22 -05:00
terminal general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
tmux Add exception for PyCharm terminal emulation 2022-10-12 16:20:42 -06:00
utility utility: Make 'http-serve' handler faster for well known cases 2022-08-03 18:51:49 -05:00
wakeonlan general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
yum general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -05:00
README.md general: Update documentation better qualifying runcom paths 2021-05-21 12:31:02 -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.