complete icon indicating copy to clipboard operation
complete copied to clipboard

Add check for autoloading compinit in zsh.go

Open ratticon opened this issue 4 years ago • 3 comments

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!

ratticon avatar Jun 27 '20 23:06 ratticon

Codecov Report

Merging #124 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           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 data Powered by Codecov. Last update 5c05e97...fcba7c8. Read the comment docs.

codecov[bot] avatar Jun 27 '20 23:06 codecov[bot]

@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.

memark avatar Nov 26 '21 20:11 memark

@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

ratticon avatar Dec 11 '21 01:12 ratticon