1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-25 01:47:25 +08:00

Compare commits

..

No commits in common. "62648d71bb05116287206d83181f9daa5a59ba67" and "232cb19859ce9b0698ff8e281dc9e5d01b0aaf27" have entirely different histories.

2 changed files with 1 additions and 6 deletions

View File

@ -39,11 +39,6 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then
fi fi
fi fi
# enable diff color if possible.
if diff --color . . &>/dev/null; then
alias diff='diff --color'
fi
setopt auto_cd setopt auto_cd
setopt multios setopt multios
setopt prompt_subst setopt prompt_subst

View File

@ -106,7 +106,7 @@ prompt_git() {
} }
local ref dirty mode repo_path local ref dirty mode repo_path
if [[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]]; then if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
repo_path=$(git rev-parse --git-dir 2>/dev/null) repo_path=$(git rev-parse --git-dir 2>/dev/null)
dirty=$(parse_git_dirty) dirty=$(parse_git_dirty)
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)" ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"