diff options
author | Thiago França da Silva | 2020-06-11 12:38:22 -0300 |
---|---|---|
committer | Thiago França da Silva | 2020-06-11 12:38:22 -0300 |
commit | f8c5b0c19fc0424113875950d0226dfcefbf843e (patch) | |
tree | d9780e7018d91cf759ef5d51a23f640ceaa7b495 /poetry-completions-generator | |
download | aur-f8c5b0c19fc0424113875950d0226dfcefbf843e.tar.gz |
Version 1.0.9
Diffstat (limited to 'poetry-completions-generator')
-rwxr-xr-x | poetry-completions-generator | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/poetry-completions-generator b/poetry-completions-generator new file mode 100755 index 000000000000..e0a1d3929aeb --- /dev/null +++ b/poetry-completions-generator @@ -0,0 +1,15 @@ +#!/usr/bin/python3 + +# This is a dummy script that fakes its own sys.argv[0] to make the completions +# subcommand do the correct thing when run from the build directory. cleo's +# completion generator uses this to generate completions for sys.argv[0] as well +# as (???) os.path.join(os.getcwd(), sys.argv[0]) for mysterious reasons. +# +# We don't want to complete 'poetry/__main__.py'.... + +import sys +from poetry.console import main + +sys.argv = ['poetry', 'completions', sys.argv.pop()] + +main() |