mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-28 07:50:09 +08:00
Clean up appearance lib file and redundant colors
calls in other files
This commit is contained in:
parent
51946eb3ce
commit
2193135ebc
@ -1,7 +1,6 @@
|
|||||||
# ls colors
|
# ls colors
|
||||||
autoload colors; colors;
|
autoload -U colors && colors
|
||||||
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
export LSCOLORS="Gxfxcxdxbxegedabagacad"
|
||||||
#export LS_COLORS
|
|
||||||
|
|
||||||
# Enable ls colors
|
# Enable ls colors
|
||||||
if [ "$DISABLE_LS_COLORS" != "true" ]
|
if [ "$DISABLE_LS_COLORS" != "true" ]
|
||||||
@ -23,7 +22,7 @@ fi
|
|||||||
#setopt no_beep
|
#setopt no_beep
|
||||||
setopt auto_cd
|
setopt auto_cd
|
||||||
setopt multios
|
setopt multios
|
||||||
setopt cdablevarS
|
setopt cdablevars
|
||||||
|
|
||||||
if [[ x$WINDOW != x ]]
|
if [[ x$WINDOW != x ]]
|
||||||
then
|
then
|
||||||
@ -43,4 +42,3 @@ ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is c
|
|||||||
|
|
||||||
# Setup the prompt with pretty colors
|
# Setup the prompt with pretty colors
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
|
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
# http://github.com/olivierverdier/zsh-git-prompt
|
# http://github.com/olivierverdier/zsh-git-prompt
|
||||||
#
|
#
|
||||||
export __GIT_PROMPT_DIR=$ZSH/plugins/git-prompt
|
export __GIT_PROMPT_DIR=$ZSH/plugins/git-prompt
|
||||||
# Initialize colors.
|
|
||||||
autoload -U colors
|
|
||||||
colors
|
|
||||||
|
|
||||||
# Allow for functions in the prompt.
|
# Allow for functions in the prompt.
|
||||||
setopt PROMPT_SUBST
|
setopt PROMPT_SUBST
|
||||||
|
@ -27,7 +27,6 @@ unmark() {
|
|||||||
rm -i "$MARKPATH/$1"
|
rm -i "$MARKPATH/$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
autoload colors
|
|
||||||
marks() {
|
marks() {
|
||||||
for link in $MARKPATH/*(@); do
|
for link in $MARKPATH/*(@); do
|
||||||
local markname="$fg[cyan]${link:t}$reset_color"
|
local markname="$fg[cyan]${link:t}$reset_color"
|
||||||
|
@ -99,10 +99,7 @@ prompt_context () {
|
|||||||
set_prompt () {
|
set_prompt () {
|
||||||
# required for the prompt
|
# required for the prompt
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
autoload colors zsh/terminfo
|
autoload zsh/terminfo
|
||||||
if [[ "$terminfo[colors]" -gt 8 ]]; then
|
|
||||||
colors
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ######### PROMPT #########
|
# ######### PROMPT #########
|
||||||
PROMPT='${PROMPT_HEAD}
|
PROMPT='${PROMPT_HEAD}
|
||||||
|
@ -7,7 +7,6 @@ get_git_dirty() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
autoload -U colors && colors
|
|
||||||
zstyle ':vcs_info:*' check-for-changes true
|
zstyle ':vcs_info:*' check-for-changes true
|
||||||
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
|
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
|
||||||
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
|
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
# Based on bira theme
|
# Based on bira theme
|
||||||
|
|
||||||
# load some modules
|
# load some modules
|
||||||
autoload -U colors zsh/terminfo # Used in the colour alias below
|
autoload -U zsh/terminfo # Used in the colour alias below
|
||||||
colors
|
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
|
|
||||||
# make some aliases for the colours: (could use normal escape sequences too)
|
# make some aliases for the colours: (could use normal escape sequences too)
|
||||||
|
@ -13,8 +13,6 @@ function virtualenv_info {
|
|||||||
PR_GIT_UPDATE=1
|
PR_GIT_UPDATE=1
|
||||||
|
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
autoload colors
|
|
||||||
colors
|
|
||||||
|
|
||||||
autoload -U add-zsh-hook
|
autoload -U add-zsh-hook
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
|
@ -44,10 +44,7 @@ setprompt () {
|
|||||||
###
|
###
|
||||||
# See if we can use colors.
|
# See if we can use colors.
|
||||||
|
|
||||||
autoload colors zsh/terminfo
|
autoload zsh/terminfo
|
||||||
if [[ "$terminfo[colors]" -ge 8 ]]; then
|
|
||||||
colors
|
|
||||||
fi
|
|
||||||
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
|
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
|
||||||
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
|
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
|
||||||
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
|
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
autoload -U colors && colors
|
|
||||||
|
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
|
|
||||||
zstyle ':vcs_info:*' stagedstr '%F{green}●'
|
zstyle ':vcs_info:*' stagedstr '%F{green}●'
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
autoload colors
|
|
||||||
colors
|
|
||||||
|
|
||||||
autoload -U add-zsh-hook
|
autoload -U add-zsh-hook
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
|
@ -63,10 +63,7 @@ setprompt () {
|
|||||||
###
|
###
|
||||||
# See if we can use colors.
|
# See if we can use colors.
|
||||||
|
|
||||||
autoload colors zsh/terminfo
|
autoload zsh/terminfo
|
||||||
if [[ "$terminfo[colors]" -ge 8 ]]; then
|
|
||||||
colors
|
|
||||||
fi
|
|
||||||
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
|
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
|
||||||
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
|
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
|
||||||
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
|
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
|
||||||
|
@ -15,8 +15,6 @@ function virtualenv_info {
|
|||||||
PR_GIT_UPDATE=1
|
PR_GIT_UPDATE=1
|
||||||
|
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
autoload colors
|
|
||||||
colors
|
|
||||||
|
|
||||||
autoload -U add-zsh-hook
|
autoload -U add-zsh-hook
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
autoload -U colors && colors
|
|
||||||
|
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
|
|
||||||
zstyle ':vcs_info:*' stagedstr '%F{green}●'
|
zstyle ':vcs_info:*' stagedstr '%F{green}●'
|
||||||
|
Loading…
Reference in New Issue
Block a user