Install git completion from github.com/git/git

This commit is contained in:
2021-11-13 14:22:37 +03:00
parent ffe4ead7a5
commit d59b7540b6

View File

@@ -1,6 +1,14 @@
# If not running interactively, don't do anything # If not running interactively, don't do anything
[[ $- != *i* ]] && return [[ $- != *i* ]] && return
gitCompletionPath="~/.config/gitcompletion.bash"
# Install git completion if needed
if [[ ! -f ~/.config/git-completion.bash ]] ; then
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash > ~/.config/git-completion.bash
fi
source ~/.config/git-completion.bash
# _ _ ___ _ ____ _____ ____ # _ _ ___ _ ____ _____ ____
# / \ | | |_ _| / \ / ___|| ____/ ___| # / \ | | |_ _| / \ / ___|| ____/ ___|
# / _ \ | | | | / _ \ \___ \| _| \___ \ # / _ \ | | | | / _ \ \___ \| _| \___ \