From fad9f4f28a90cb744d6d76b3e2e4019572711ee4 Mon Sep 17 00:00:00 2001 From: Leonid Volnitsky Date: Wed, 17 Mar 2010 22:09:07 +0200 Subject: -- completion docs/cleanup --- git-prompt.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'git-prompt.sh') diff --git a/git-prompt.sh b/git-prompt.sh index 83c2d76..a4c7216 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -379,11 +379,8 @@ parse_hg_status() { vcs_info=${branch/default/D} } -alias g='git' -# parse git complete -parse_git_complete() -{ +parse_git_complete() { if [ "${BASH_VERSION%.*}" \< "3.0" ]; then # echo "You will need to upgrade 'bash' to version 3.0 \ # for full programmable completion features (bash complete) \ @@ -391,13 +388,14 @@ parse_git_complete() return fi - complete -f -W "$(echo `git branch -a | sed -e s/[\ \*]//g | cut -f 1 -d ' ' | uniq`; \ - echo `git remote | sed -e s/[\ \*]//g | cut -f 1 -d ' ' | uniq`; \ - echo `git | tail -23 | head -21 | cut -d ' ' -f 4`; \ - echo '--help'; \ - echo '--staged'; \ - echo 'remote'; \ - echo 'help'; \ + complete -f -W "$( + echo `git branch -a | sed -e s/[\ \*]//g | cut -f 1 -d ' ' | uniq`; \ + echo `git remote | sed -e s/[\ \*]//g | cut -f 1 -d ' ' | uniq`; \ + echo `git | tail -23 | head -21 | cut -d ' ' -f 4`; \ + echo '--help'; \ + echo '--staged'; \ + echo 'remote'; \ + echo 'help'; \ )" g git } -- cgit v1.2.3