summaryrefslogtreecommitdiff
path: root/git-prompt.sh
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2010-03-17 22:09:07 +0200
committerLeonid Volnitsky <Leonid@Volnitsky.com>2010-03-17 22:51:47 +0200
commitfad9f4f28a90cb744d6d76b3e2e4019572711ee4 (patch)
treefa65e59ec3f557401cf40e4fc3de58cc2f32ff79 /git-prompt.sh
parentgit autocompletion (diff)
downloadgit-prompt-fad9f4f28a90cb744d6d76b3e2e4019572711ee4.tar.gz
git-prompt-fad9f4f28a90cb744d6d76b3e2e4019572711ee4.tar.bz2
git-prompt-fad9f4f28a90cb744d6d76b3e2e4019572711ee4.zip
-- completion docs/cleanup
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-xgit-prompt.sh20
1 files changed, 9 insertions, 11 deletions
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
}