Tab completion is incredibly slow and picky about formatting
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Describe the bug
Tab completion is painfully slow. See repro.
**Command Name**
`az`
**Errors:**
## To Reproduce:
1. Properly configure tab completion for your shell, I'm in zsh but this all holds true in bash as well.
1. Type `az` in the terminal
1. Hit tab, it adds a space instead of giving you tab completion.
1. Hit tab again, wait 1-2 seconds for tab completion to process
1. After a wait, tab completion displays a list of completions.
Another example:
1. Type `az devops` or `az boards` in the terminal
1. Hit tab, wait ~5 seconds
1. Get `-- no matches found --` output.
1. Hit space, hit tab
1. Wait ~1s get a bunch of completions
## Expected Behavior
A response should be given immediately with no delay and it should not be picky about whether there is a space after the last command.
The entire autocompletion process is way too slow. Type git and hit tab and you get an _instant_ response with completions with nice formatting. This has got to be better in the azure cli. 1-2s is too long, but 5 seconds is just shameful especially having it return no results after, only to work after hitting space.
Please let me know if you need any more information to help prioritize this work, feel free to reach out to me via email or teams via my alias: jiboulte.
## Environment Summary
```
Darwin-18.2.0-x86_64-i386-64bit
Python 3.7.3
Shell: bash
azure-cli 2.0.62
Extensions:
azure-devops 0.4.0
Python location '/usr/local/Cellar/azure-cli/2.0.62/libexec/bin/python'
Extensions directory '/Users/jiboulte/.azure/cliextensions'
Python (Darwin) 3.7.3 (default, Apr 19 2019, 09:07:31)
[Clang 10.0.1 (clang-1001.0.46.3)]
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.