From fcf539ecef4a3484eb62ef185f7d9ddf713b2a7d Mon Sep 17 00:00:00 2001 From: wukuan405 Date: Thu, 17 Oct 2019 00:47:11 +0900 Subject: [PATCH] change help message from hard coding to dynamic (#1421) ## before ```Usage: pyenv [] Some useful pyenv commands are: commands List all available pyenv commands local Set or show the local application-specific Python version global Set or show the global Python version shell Set or show the shell-specific Python version install Install a Python version using python-build uninstall Uninstall a specific Python version rehash Rehash pyenv shims (run this after installing executables) version Show the current Python version and its origin versions List all Python versions available to pyenv which Display the full path to an executable whence List all Python versions that contain the given executable See `pyenv help ' for information on a specific command. For full documentation, see: https://github.com/pyenv/pyenv#readme ``` ## after ``` Usage: pyenv [] Some useful pyenv commands are: commands List all available pyenv commands local Set or show the local application-specific Python version --version Display the version of pyenv commands List all available pyenv commands exec Run an executable with the selected Python version global Set or show the global Python version help Display help for a command hooks List hook scripts for a given pyenv command init Configure the shell environment for pyenv install Install a Python version using python-build local Set or show the local application-specific Python version prefix Display prefix for a Python version rehash Rehash pyenv shims (run this after installing executables) root Display the root directory where versions and shims are kept shell Set or show the shell-specific Python version shims List existing pyenv shims uninstall Uninstall a specific Python version update update pyenv and plugins version Show the current Python version and its origin version-file Detect the file that sets the current pyenv version version-name Show the current Python version version-origin Explain how the current Python version is set versions List all Python versions available to pyenv whence List all Python versions that contain the given executable which Display the full path to an executable See `pyenv help ' for information on a specific command. For full documentation, see: https://github.com/pyenv/pyenv#readme ``` --- libexec/pyenv-help | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/pyenv-help b/libexec/pyenv-help index 8270993e..eb991203 100755 --- a/libexec/pyenv-help +++ b/libexec/pyenv-help @@ -151,7 +151,7 @@ if [ -z "$1" ] || [ "$1" == "pyenv" ]; then [ -z "$usage" ] || exit echo echo "Some useful pyenv commands are:" - print_summaries commands local global shell install uninstall rehash version versions which whence + print_summaries commands $(exec pyenv-commands | sort -u) echo echo "See \`pyenv help ' for information on a specific command." echo "For full documentation, see: https://github.com/pyenv/pyenv#readme"