We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With this program:
#!/usr/bin/env python import argparse import argcomplete def c_url(prefix, parsed_args, **kwargs): return [ "http://url1", "http://url2" ] def c_get(prefix, parsed_args, **kwargs): return [ "get1", "get2" ] def c_put(prefix, parsed_args, **kwargs): return [ ] parser = argparse.ArgumentParser() parser.add_argument("--url", help="URL").completer = c_url sub = parser.add_subparsers() get = sub.add_parser("get") get.add_argument("filename").completer = c_get put = sub.add_parser("put") put.add_argument("filename").completer = c_put argcomplete.autocomplete(parser) args = parser.parse_args()
Arguments like --url show up after get and put, where they're not allowed:
--url
get
put
./test.py get <tab> expect: get1 get2 actual: --help --url -h get1 get2 ./test.py put <tab> expect: (no suggestions) actual: --help --url -h
The text was updated successfully, but these errors were encountered:
7bd25c3
Thanks for reporting (btw, -h/--help are valid completions in your examples, and are still produced after this fix).
-h
--help
Sorry, something went wrong.
No branches or pull requests
With this program:
Arguments like
--url
show up afterget
andput
, where they're not allowed:The text was updated successfully, but these errors were encountered: