From d59b7540b6fb2cc230e679bfac48653202f03f51 Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Sat, 13 Nov 2021 14:22:37 +0300 Subject: [PATCH] Install git completion from github.com/git/git --- config/.bashrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/.bashrc b/config/.bashrc index 7b3bf62..774c23a 100644 --- a/config/.bashrc +++ b/config/.bashrc @@ -1,6 +1,14 @@ # If not running interactively, don't do anything [[ $- != *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 + # _ _ ___ _ ____ _____ ____ # / \ | | |_ _| / \ / ___|| ____/ ___| # / _ \ | | | | / _ \ \___ \| _| \___ \