Created
February 7, 2020 18:13
-
-
Save rroblak/bda6675897c768db213ca3dc8f8b4908 to your computer and use it in GitHub Desktop.
Alias `git` to `g` with support for `hub` if it's installed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Alias `hub` to `git` if it's installed. | |
if [[ ! -z $(command -v hub) ]]; then | |
eval "$(hub alias -s)" | |
fi | |
# Alias `git` to `g` and set up completion (also brings in `hub` completion if it's installed). | |
alias g=git | |
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion | |
__git_complete g _git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment