mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Merge 55a70b4433 into 61e3951e4b
This commit is contained in:
commit
51d8669189
2 changed files with 32 additions and 26 deletions
|
|
@ -28,15 +28,18 @@ else
|
||||||
SCREEN_NO=""
|
SCREEN_NO=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Apply theming defaults
|
if [ "$DISABLE_THEME" != "true" ]
|
||||||
PS1="%n@%m:%~%# "
|
then
|
||||||
|
# Apply theming defaults
|
||||||
|
PS1="%n@%m:%~%# "
|
||||||
|
|
||||||
# git theming default: Variables for theming the git info prompt
|
# git theming default: Variables for theming the git info prompt
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of the prompt, before the branch name
|
ZSH_THEME_GIT_PROMPT_PREFIX="git:(" # Prefix at the very beginning of the prompt, before the branch name
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")" # At the very end of the prompt
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty
|
ZSH_THEME_GIT_PROMPT_DIRTY="*" # Text to display if the branch is dirty
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean
|
ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is clean
|
||||||
|
|
||||||
# Setup the prompt with pretty colors
|
# Setup the prompt with pretty colors
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
37
oh-my-zsh.sh
37
oh-my-zsh.sh
|
|
@ -68,26 +68,29 @@ for config_file ($ZSH_CUSTOM/*.zsh(N)); do
|
||||||
done
|
done
|
||||||
unset config_file
|
unset config_file
|
||||||
|
|
||||||
# Load the theme
|
if [ "$DISABLE_THEME" != "true" ]
|
||||||
if [ "$ZSH_THEME" = "random" ]
|
|
||||||
then
|
then
|
||||||
themes=($ZSH/themes/*zsh-theme)
|
# Load the theme
|
||||||
N=${#themes[@]}
|
if [ "$ZSH_THEME" = "random" ]
|
||||||
((N=(RANDOM%N)+1))
|
|
||||||
RANDOM_THEME=${themes[$N]}
|
|
||||||
source "$RANDOM_THEME"
|
|
||||||
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
|
|
||||||
else
|
|
||||||
if [ ! "$ZSH_THEME" = "" ]
|
|
||||||
then
|
then
|
||||||
if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ]
|
themes=($ZSH/themes/*zsh-theme)
|
||||||
|
N=${#themes[@]}
|
||||||
|
((N=(RANDOM%N)+1))
|
||||||
|
RANDOM_THEME=${themes[$N]}
|
||||||
|
source "$RANDOM_THEME"
|
||||||
|
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
|
||||||
|
else
|
||||||
|
if [ ! "$ZSH_THEME" = "" ]
|
||||||
then
|
then
|
||||||
source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme"
|
if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ]
|
||||||
elif [ -f "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" ]
|
then
|
||||||
then
|
source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme"
|
||||||
source "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme"
|
elif [ -f "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" ]
|
||||||
else
|
then
|
||||||
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
source "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme"
|
||||||
|
else
|
||||||
|
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue