From 5b9d758d32eb3765c90ed6fb558a99fcc96cae20 Mon Sep 17 00:00:00 2001 From: Bryan Jowers Date: Sun, 21 Oct 2012 16:49:41 -0500 Subject: [PATCH] Fix. --- .gitmodules | 12 ++++++++++++ gitconfig | 1 + vim/bundle/command-t | 2 +- vim/bundle/vim-fugitive | 2 +- vim/bundle/vim-less | 1 + zsh/prompt | 6 +++++- 6 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 vim/bundle/vim-less diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b14ef2d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule "vim/bundle/vim-less"] + path = vim/bundle/vim-less + url = https://github.com/groenewege/vim-less.git +[submodule "vim/bundle/command-t"] + path = vim/bundle/command-t + url = git://git.wincent.com/command-t.git +[submodule "vim/bundle/vim-fugitive"] + path = vim/bundle/vim-fugitive + url = git://github.com/tpope/vim-fugitive.git +[submodule "vim/bundle/vim-javascript"] + path = vim/bundle/vim-javascript + url = https://github.com/pangloss/vim-javascript.git diff --git a/gitconfig b/gitconfig index 831a493..69a07cb 100644 --- a/gitconfig +++ b/gitconfig @@ -21,6 +21,7 @@ cat = show list = show ls = show + subup = submodule update --init --recursive untrack-ignored = !git-untracked-ignored info = !git-info diff --git a/vim/bundle/command-t b/vim/bundle/command-t index 18686a8..07087e1 160000 --- a/vim/bundle/command-t +++ b/vim/bundle/command-t @@ -1 +1 @@ -Subproject commit 18686a82a2e4d015b877bf0b6867a269aa8a284f +Subproject commit 07087e16ba8fe0a87b1d1ccd03e158a0157dc1f8 diff --git a/vim/bundle/vim-fugitive b/vim/bundle/vim-fugitive index 64716b9..05763df 160000 --- a/vim/bundle/vim-fugitive +++ b/vim/bundle/vim-fugitive @@ -1 +1 @@ -Subproject commit 64716b9622e5c3fae0caec7e9589988a9da146cb +Subproject commit 05763df0ed8bfa8a6d4453d089e9d82530497ea1 diff --git a/vim/bundle/vim-less b/vim/bundle/vim-less new file mode 160000 index 0000000..0223dcd --- /dev/null +++ b/vim/bundle/vim-less @@ -0,0 +1 @@ +Subproject commit 0223dcdf0f4d3cb2b811a10c3673c0832b337415 diff --git a/zsh/prompt b/zsh/prompt index 44c9c14..6c70ecc 100755 --- a/zsh/prompt +++ b/zsh/prompt @@ -68,6 +68,7 @@ ZSH_THEME_GIT_PROMPT_MODIFIED="!" ZSH_THEME_GIT_PROMPT_DELETED="-" ZSH_THEME_GIT_PROMPT_UNMERGED="&" ZSH_THEME_GIT_PROMPT_RENAMED=">" +ZSH_THEME_GIT_PROMPT_SUBMODULE="_" git_prompt_status() { INDEX=$(git status --porcelain 2> /dev/null) STATUS="" @@ -97,6 +98,9 @@ git_prompt_status() { if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS" fi + if $(cd "$1" ; git submodule status --recursive | egrep '^(\+|-)' &> /dev/null); then + STATUS="$ZSH_THEME_GIT_PROMPT_SUBMODULE$STATUS" + fi echo $STATUS } function updateprompt () { @@ -158,7 +162,7 @@ function updateprompt () { stashes="$(git stash list 2>/dev/null | wc -l | xargs)" stashpart="${RESETCOLOR}${GRAY}(${GREEN}${stashes}${GRAY} stashed)${RESETCOLOR}" fi - local stats="$(git_prompt_status)" + local stats="$(git_prompt_status "${repodir}")" PROMPT=${RESETCOLOR}${HOSTCOLOR}$'%n@'${LHOSTNAME}${BLACKCOLOR}':'${PATHCOLOR}"${reponame} ${RED}${branch}${YELLOW}${stats}${BLACKCOLOR}${additional} ${PATHCOLOR}"$'%45<...<'"${repopath}"' %(?..'${BOLDERRORCOLOR}$')%(!.#.$) '${RESETCOLOR} RPROMPT=${RESETCOLOR}${stashpart}${remotepart}$'%1(j.'${JOBCOLOR}$'[%j].)%(?..'${ERRORCOLOR}$'[%?])'${CLOCKCOLOR}$'[%t]'${RESETCOLOR} cdpath=( . "$repodir" ~ ~/Giftikigit ~/launchrockgit ~/loagit ~/git .. )