mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 15:34:50 +08:00
Compare commits
2 Commits
232cb19859
...
62648d71bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62648d71bb | ||
|
|
d24a9dbccc |
@ -39,6 +39,11 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# enable diff color if possible.
|
||||
if diff --color . . &>/dev/null; then
|
||||
alias diff='diff --color'
|
||||
fi
|
||||
|
||||
setopt auto_cd
|
||||
setopt multios
|
||||
setopt prompt_subst
|
||||
|
||||
@ -106,7 +106,7 @@ prompt_git() {
|
||||
}
|
||||
local ref dirty mode repo_path
|
||||
|
||||
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
|
||||
if [[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]]; then
|
||||
repo_path=$(git rev-parse --git-dir 2>/dev/null)
|
||||
dirty=$(parse_git_dirty)
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user