Autocompletions for Python installs via Pyton.org Mac installer#222
Open
sbaack wants to merge 4 commits intojustinmayer:mainfrom
Open
Autocompletions for Python installs via Pyton.org Mac installer#222sbaack wants to merge 4 commits intojustinmayer:mainfrom
sbaack wants to merge 4 commits intojustinmayer:mainfrom
Conversation
Adds autocompletions for `vf new -p` and `vf upgrade -p` to list version numbers of Python installs from asdf or pyenv.
First, this commit adds detection of Python versions installed via Python.org's Mac OS installers (which are installed in /Library/Frameworks/Python.framework/Versions/). virtualfish will prefer Python.org installations over Homebrew Python, but asdf, pyenv, or pythonz are preferred over Python.org installs. Second, this commit fixes an issue in how Python versions are deteced when calling 'vf new -p' or 'vf upgrade -p'. Before this commit, virtualfish checked if various executables are available, but didn't continue to search if the specified Python version has not been installed with said application. For example, if 'pyenv' is available but the specified Python version has not been installed with pyenv, virtualfish will directly fall back to pass to Virtualenv as-is instead of continuing the search in, say, pythonz or Homebrew. While it is unlikely that one would have both pyenv and pythonz installed, continuing to search for Python versions if it hasn't been installed in the first application found is useful with regards to detecting Python.org installs. One might mostly use pyenv, but has issues compiling a particular Python version with it and therefore installs it with Python.org's Mac installer.
This brings the two previous commits together by adding autocompletions for Python versions installed with Python.org's Mac installer. It adds another valid option to the VIRTUALFISH_PYVERSION_COMPLETION environment variable and provides an extra function to provide autocompletions of Python versions installed in /Library/Frameworks/Python.framework/Versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This brings the two previous commits together by adding autocompletions for Python versions installed with Python.org's Mac installer. It adds another valid option to the
VIRTUALFISH_PYVERSION_COMPLETIONenvironment variable and an extra function to provide autocompletions of Python versions installed in/Library/Frameworks/Python.framework/VersionsNote that this already includes #220 and #221 because it depends on them. This only adds the extra function in
__vfsupport_setup_autocompleteand slightly adjusts the docs.