From: Silvio Rhatto Date: Mon, 31 Mar 2014 14:43:26 +0000 (-0300) Subject: Source git completion if needed X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=4c30cdc7be59f697f424c4e11ef5a28055a5e7d7;p=scripts.git Source git completion if needed --- diff --git a/prompt b/prompt index 8247b1a..7669eb7 100644 --- a/prompt +++ b/prompt @@ -42,4 +42,9 @@ function command_prompt() { PS2="${BOLD}>${OFF} " } +# Older systems doesn't source git completion by default +if ! type __git_ps1 &> /dev/null && [ -e "/etc/bash_completion.d/git" ]; then + source /etc/bash_completion.d/git +fi + PROMPT_COMMAND="command_prompt"