complete
complete copied to clipboard
Add check for autoloading compinit in zsh.go
Encountered issue when trying to install autocompletion for terraform on fresh MacOS with default zsh configuration, using their terraform -install-autocomplete command.
Raised issue on terraform git and found it imports this module.
Cloned zsh.go and added check for the line that autoloads the zsh compinit.
Please review, thanks!
Codecov Report
Merging #124 into master will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## master #124 +/- ##
=======================================
Coverage 82.43% 82.43%
=======================================
Files 10 10
Lines 541 541
=======================================
Hits 446 446
Misses 75 75
Partials 20 20
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 5c05e97...fcba7c8. Read the comment docs.
@ratticon @posener What's the status on this? Still running into this issue. Today it was the autocomplete for the latest version of Terraform that didn't work at all on a fresh Mac.
@ratticon @posener What's the status on this? Still running into this issue. Today it was the autocomplete for the latest version of Terraform that didn't work at all on a fresh Mac.
Hi @memark!
I'm sorry for letting this fall to the wayside, I don't currently have access to a new Mac to figure this out. Hashicorp closed the issue I raised: terraform -install-autocomplete not working on stock macOS Catalina 10.15.5 with default zsh shell on Jul 28, 2020.
Does adding:
autoload -U +X bashcompinit && bashcompinit
autoload -Uz compinit && compinit
to ~/.zshrc and running exec zsh or restarting zsh enable you to run terraform -install-autocomplete without error?
Kind Regards, Ben