Open ZacSweers opened 3 years ago
Try quitting Terminal and re-opening it. This was a required step that I had to do to get it to work properly.
The issue is that the manual install step would put the _gradle
file in this spot: ~/.zsh/gradle-completion/_gradle
. However, running brew install gradle-completion
puts the file in /usr/local/share/zsh/site-functions/_gradle
.
So if you run source /usr/local/share/zsh/site-functions/_gradle 1>&2 2>/dev/null; __gradle-completion-init
. Then it'll work.
I ran into this same issue :).
Edit: Running ./gradlew
I am getting this error
% source /usr/local/share/zsh/site-functions/_gradle
_gradle:6: command not found: _arguments
__gradle_tasks:20: command not found: _describe
After which I can't get autocomplete working following the above steps or the troubleshooting steps in readme 😞
I'm running into the same problem! Is homebrew not the recommended way to install gradle-completion
?
just add following snippet to your .zshrc
if [ $commands[brew] ]
then
fpath=("$(brew --prefix)/share/zsh/site-functions" $fpath)
fi
see https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh
~/.zsh/gradle-completion
doesn't exist, is there some undocumented intermediary step required?