Skip to content

Commit

Permalink
add .git-completion.bash for git v2.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Grigory Efimov committed Aug 19, 2021
1 parent f812865 commit 38c7214
Show file tree
Hide file tree
Showing 2 changed files with 3,570 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,24 @@ EOF
fi
}

# sources
if [[ -f $HOME/.git-completion.sh ]]; then
source $HOME/.git-completion.sh
# git completion {{
GIT_VERSION=$( git version 2>/dev/null | awk '{print $3}' )
if [[ $( echo -e "2.0.0.0\n" $GIT_VERSION | sort -V | tail -1 ) == "2.0.0.0" ]]; then
GIT_COMPLETION="$HOME/.git-completion.sh"
else
GIT_COMPLETION="$HOME/.git-completion.bash"
fi
if [[ -f $GIT_COMPLETION ]]; then
source $GIT_COMPLETION
fi
# }}

# git promt {{
GIT_PROMPT_ONLY_IN_REPO=1
if [[ -f $HOME/.bash-git-prompt/gitprompt.sh ]]; then
source $HOME/.bash-git-prompt/gitprompt.sh
fi
# }}

# screen settings
export SCREENDIR=$HOME/.screen
Expand Down
Loading

0 comments on commit 38c7214

Please sign in to comment.