argcomplete does not work with aws-vault
See original GitHub issueI’ve got custom Python script and added argcomplete
to it using instructions from https://kislyuk.github.io/argcomplete/. One note - I need to call it using aws-vault
cause my script works with Amazon and I need credentials setup before script logic work.
If I call my lptl.py
directly autocomplete works:
$ python3 lptl.py --
--ansible-repo-path --help --skip-app-start --test-slaves-count
--app-version --servers-list --test-environment --test-slaves-ips
--config --show-test-plan-only --test-scenario-name
--debug --skip-app-deploy --test-scenario-path
But when I call it with wrapper, it is not, pressing TAB after following command line results to nothing:
$ aws-vault exec shared-test-full -- python3 lptl.py --
Could anybody help solving this issue?
BTW, I use macOS.
P.S.: Also I’ve got virtualenv, don’t know if it affects, but I installed argcomplete
both to local and global environments.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Command completion - AWS Command Line Interface
For the AWS completer to work successfully, the aws_completer needs to be in your shell's path. The which command can check if the...
Read more >psread · PyPI
Quick, simple AWS Parameter Store CLI for listing/reading params with tab completion.
Read more >Auto-complete does not work for user with argcomplete
The auto-completion feature does not seem to work for me. I created a small test script that reproduces the problem on my setup...
Read more >python3-argcomplete-1.9.3-6.el8.noarch.rpm
Argcomplete provides easy, extensible command line tab completion of arguments for your Python script. It makes two assumptions: * You are using bash...
Read more >Getting Started — Cloud Custodian documentation
If you have other errors, or for tcsh support, see the argcomplete docs. If you are invoking custodian via the python executable tab...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Solved by incapsulating
aws-vault
call into Python script and passing environment from it to internalaws
subprocess calls. Now autocompletion works fine.argcomplete does not generally work with arbitrary command line wrappers. To understand why, check the section of the documentation describing the protocol (https://kislyuk.github.io/argcomplete/#argcomplete-autocomplete-parser). When you run your command through a wrapper, the wrapper must be aware of the argcomplete protocol (in particular, it must forward fd 8 to the wrapped subprocess). I don’t think it’s possible to make argcomplete work with this utility.