diff options
author | Ronan Pigott <ronan@rjp.ie> | 2025-02-27 12:01:45 -0700 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2025-02-28 20:54:22 +0100 |
commit | f77e469ad60973f45e1ee178f1d66686d326a75a (patch) | |
tree | 102c83a9cf671145a121aa7c0af96c1b440959bc /Completion/Unix/Command/_python_module-json.tool | |
parent | 1818323f451f426f20ca47c50e8fc63824578479 (diff) | |
download | zsh-f77e469ad60973f45e1ee178f1d66686d326a75a.tar.gz zsh-f77e469ad60973f45e1ee178f1d66686d326a75a.zip |
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.
Diffstat (limited to 'Completion/Unix/Command/_python_module-json.tool')
-rw-r--r-- | Completion/Unix/Command/_python_module-json.tool | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_python_module-json.tool b/Completion/Unix/Command/_python_module-json.tool new file mode 100644 index 000000000..61c22686b --- /dev/null +++ b/Completion/Unix/Command/_python_module-json.tool @@ -0,0 +1,13 @@ +#autoload + +_arguments -S \ + '(-h --help)'{-h,--help}'[show a help message and exit]' \ + '--sort-keys[sort the output of dictionaries alphabetically by key]' \ + '--no-ensure-ascii[disable escaping of non-ASCII characters]' \ + '--json-lines[parse input using the JSON Lines format]' \ + '--indent=[separate items with newlines and use this number of spaces for indentation]:spaces:' \ + '--tab[separate items with newlines and use tabs for indentation]' \ + '--no-indent[separate items with spaces rather than newlines]' \ + '--compact[suppress all whitespace separation]' \ + '1:infile:_files' \ + '2:outfile:_files' |