From f77e469ad60973f45e1ee178f1d66686d326a75a Mon Sep 17 00:00:00 2001 From: Ronan Pigott Date: Thu, 27 Feb 2025 12:01:45 -0700 Subject: 53393: Complete python module arguments Python modules can behave like commands in their own right. This allows modules to define _python_module-* functions that are used to complete module arguments. Also gets the ball rolling by defining completions for venv, http.server, and json.tool. --- Completion/Unix/Command/_python_module-venv | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Completion/Unix/Command/_python_module-venv (limited to 'Completion/Unix/Command/_python_module-venv') diff --git a/Completion/Unix/Command/_python_module-venv b/Completion/Unix/Command/_python_module-venv new file mode 100644 index 000000000..1af53cc41 --- /dev/null +++ b/Completion/Unix/Command/_python_module-venv @@ -0,0 +1,14 @@ +#autoload + +_arguments -S \ + '(-h --help)'{-h,--help}'[show a help message and exit]' \ + '--system-site-packages[give the virtual environment access to the system site-packages dir]' \ + '(--symlinks --copies)--symlinks[try to use symlinks rather than copies]' \ + '(--symlinks --copies)--copies[try to use copies rather than symlinks]' \ + '(--clear --upgrade)--clear[delete the contents of the environment directory if it already exists]' \ + '(--clear --upgrade)--upgrade[upgrade the environment directory to use this version of Python]' \ + '--without-pip[skip installing or upgrading pip]' \ + '--prompt[provides an alternative prompt prefix for the environment]' \ + '--upgrade-deps[upgrade core dependencies to the latest version]' \ + '--without-scm-ignore-files[skip adding SCM ignore files to the environment directory]' + '*::virtual environment:_directories' -- cgit v1.2.3