todd-dsm / mac-ops

QnD Automation to build a MacBook Pro for DevOps
MIT License
11 stars 7 forks source link

pull git completions #9

Closed todd-dsm closed 6 years ago

todd-dsm commented 6 years ago

All are here: https://github.com/git/git/tree/master/contrib/completion

todd-dsm commented 6 years ago

fixed by installing git; the completions come with the package. Holding off on git-prompt.sh; maybe powerline will be better.

todd-dsm commented 6 years ago

git-prompt.sh is enabled with: (opt 3b) PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'

https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Bash

todd-dsm commented 6 years ago

completions are included with git:

brew reinstall git
==> Reinstalling git 
==> Downloading https://homebrew.bintray.com/bottles/git-2.18.0.sierra.bottle.tar.gz
Already downloaded: /Users/vagrant/Library/Caches/Homebrew/downloads/6837d2daedcf25dbed6e05c47f6ada3a363e422d1c381960bcad3286a40e2dad--git-2.18.0.sierra.bottle.tar.gz
==> Pouring git-2.18.0.sierra.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions
...
==> Summary
🍺  /usr/local/Cellar/git/2.18.0: 1,488 files, 296.8MB

they are called-to explicitly in ~/.bashrc:

grep '#.*GIT.*#' -B1 -A4 ~/.bashrc 
###############################################################################
###                                  GIT                                    ###
###############################################################################
source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/git-prompt.sh

need to fix this properly