mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00
More.
This commit is contained in:
parent
d810ccc293
commit
080393ed9e
2 changed files with 6 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
||||||
cat = show
|
cat = show
|
||||||
list = show
|
list = show
|
||||||
ls = show
|
ls = show
|
||||||
|
subup = submodule update --init --recursive
|
||||||
|
|
||||||
untrack-ignored = !git-untracked-ignored
|
untrack-ignored = !git-untracked-ignored
|
||||||
info = !git-info
|
info = !git-info
|
||||||
|
|
|
@ -68,6 +68,7 @@ ZSH_THEME_GIT_PROMPT_MODIFIED="!"
|
||||||
ZSH_THEME_GIT_PROMPT_DELETED="-"
|
ZSH_THEME_GIT_PROMPT_DELETED="-"
|
||||||
ZSH_THEME_GIT_PROMPT_UNMERGED="&"
|
ZSH_THEME_GIT_PROMPT_UNMERGED="&"
|
||||||
ZSH_THEME_GIT_PROMPT_RENAMED=">"
|
ZSH_THEME_GIT_PROMPT_RENAMED=">"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUBMODULE="_"
|
||||||
git_prompt_status() {
|
git_prompt_status() {
|
||||||
INDEX=$(git status --porcelain 2> /dev/null)
|
INDEX=$(git status --porcelain 2> /dev/null)
|
||||||
STATUS=""
|
STATUS=""
|
||||||
|
@ -97,6 +98,9 @@ git_prompt_status() {
|
||||||
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
|
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
|
||||||
fi
|
fi
|
||||||
|
if $(cd "$1" ; git submodule status --recursive | egrep '^(\+|-)' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_SUBMODULE$STATUS"
|
||||||
|
fi
|
||||||
echo $STATUS
|
echo $STATUS
|
||||||
}
|
}
|
||||||
function updateprompt () {
|
function updateprompt () {
|
||||||
|
@ -158,7 +162,7 @@ function updateprompt () {
|
||||||
stashes=$(git stash list 2>/dev/null | wc -l)
|
stashes=$(git stash list 2>/dev/null | wc -l)
|
||||||
stashpart="${RESETCOLOR}${GRAY}(${GREEN}${stashes}${GRAY} stashed)${RESETCOLOR}"
|
stashpart="${RESETCOLOR}${GRAY}(${GREEN}${stashes}${GRAY} stashed)${RESETCOLOR}"
|
||||||
fi
|
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}
|
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}
|
RPROMPT=${RESETCOLOR}${stashpart}${remotepart}$'%1(j.'${JOBCOLOR}$'[%j].)%(?..'${ERRORCOLOR}$'[%?])'${CLOCKCOLOR}$'[%t]'${RESETCOLOR}
|
||||||
cdpath=( . "$repodir" ~ ~/Giftikigit ~/launchrockgit ~/loagit ~/git .. )
|
cdpath=( . "$repodir" ~ ~/Giftikigit ~/launchrockgit ~/loagit ~/git .. )
|
||||||
|
|
Loading…
Add table
Reference in a new issue