bobthecow / git-flow-completion

Bash, Zsh and fish completion support for git-flow.
MIT License
2.79k stars 385 forks source link

macOS Catalina, not working #57

Open narlei opened 4 years ago

narlei commented 4 years ago

Stop working in macOS Catalina

ladislas commented 4 years ago

I think it's because you cannot run brew install git --without-completions anymore...

Pakinwet commented 4 years ago

From my experience in this case I used this cmd autoload -Uz compinit && compinit it will help to fix your problem.

Ref : https://stackoverflow.com/questions/24513873/git-tab-completion-not-working-in-zsh-on-mac

thatdocslady commented 4 years ago

I'm having similar trouble with Bash on Catalina (brand new laptop, not an OS upgrade). Homebrew installation was fine, all the scripts and bash files are in the correct places, and I created a bash_profile because I didn't have one, and even set my shell to load with Bash Completion folder from the Terminal preferences. Any ideas? Thanks!

patec commented 4 years ago

@thatdocslady I'm having similar trouble with Bash on Catalina (brand new laptop, not an OS upgrade). Homebrew installation was fine, all the scripts and bash files are in the correct places, and I created a bash_profile because I didn't have one, and even set my shell to load with Bash Completion folder from the Terminal preferences. Any ideas? Thanks!

Default shell is now zshell and not bash. Update your shell and change it back to bash and you should be good to go.
For terminal: Preferences -> General Shells open with and change to /bin/bash

Iterm: Preferences -> Profiles -> Command -> Custom shell and enter /bin/bash

regulardesigner commented 4 years ago

Thanks, it's been two days that I'm searching for a solution to my autocomplete issue on the Iterm app! 🙏

micaelomota commented 4 years ago

For those having the same issue on Mac OS Catalina and zsh, here is my simple solution:

It is very likely that you already have the git autocomplete files.

Check it running ls /Library/Developer/CommandLineTools/usr/share/git-core, you should see something like:

Screen Shot 2020-05-28 at 3 09 50 PM

If you don't have it, download it and save it anywhere, I suggest it to be a folder under the home directory like .zshrc. Then add your folder to your $PATH environment variable.

Then, open (or create) the file ~/.zprofile and add autoload -Uz compinit && compinit in the last line.

And now, just close and open your shell again.

haslo commented 4 years ago

I had to add autoload -Uz compinit && compinit to my ~/.zshrc instead, but that worked. Thanks @micaelomota!

sanscontext commented 3 years ago

I'm unclear how I'm supposed to mend this if it's broken on bash and I want to keep using bash. I see that I do have the files @micaelomota listed at /Library/Developer/CommandLineTools/usr/share/git-core, but I'm unclear what I'm supposed to do with a variable here, or how to modify this if I'm keeping bash. Help please?

micaelomota commented 3 years ago

@sanscontext if you are keeping bash, the only thing you need to do is to add autoload -Uz compinit && compinit in your ~/.bashrc file

sanscontext commented 3 years ago

@micaelomota Much appreciated, but I think I need to do something more than that. 🤔 This is the topline when I restart Terminal after adding this. -bash: autoload: command not found

nawa commented 3 years ago

If nothing helps, try to remove symlink /usr/local/share/zsh/site-functions/_git that appears after installation with brew brew install git