Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS High Sierra issue: was missing right version of git-completion.bash #55

Open
FelixGV opened this issue Oct 18, 2018 · 3 comments

Comments

@FelixGV
Copy link

FelixGV commented Oct 18, 2018

I was following the helpful instructions provided here:

#46 (comment)

However, afterwards, I got the following appearing in my shell:

git flowUnknown option: --list-cmds=list-mainporcelain,others,nohelpers,alias,list-complete,config
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

I then discovered on StackExchange that it was because the master version of git-completion.bash I had downloaded was too recent for my built-in version of git:

https://apple.stackexchange.com/questions/327817/git-completion-bash-producing-error-on-macos-sierra-10-12-6

Solution

I found out what my version of git was:

$ git --version
git version 2.10.1 (Apple Git-78)

And then I downloaded the corresponding git-completion.bash version, e.g.:

https://raw.githubusercontent.com/git/git/v2.10.1/contrib/completion/git-completion.bash

It works for me now (:

@cashank
Copy link

cashank commented Oct 18, 2018

Upgrading git via Brew will also fix this (brew install git; launch new terminal session), if you're allowed to do this on your machine. Literally just resolved this same issue on Mojave.

@bobthecow
Copy link
Owner

@FelixGV want to add a note to the wiki? :)

@simonmarton
Copy link

Thanks! I also needed to set the LC_ALL envvar for sed on a fresh Mojave.

eg.

# .bash_profile

LC_ALL=C
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants