Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
2193135e
Commit
2193135e
authored
Feb 09, 2015
by
Marc Cornellà
Browse files
Clean up appearance lib file and redundant `colors` calls in other files
parent
51946eb3
Changes
13
Hide whitespace changes
Inline
Side-by-side
lib/theme-and-appearance.zsh
View file @
2193135e
# ls colors
autoload colors
;
colors
;
autoload
-U
colors
&&
colors
export
LSCOLORS
=
"Gxfxcxdxbxegedabagacad"
#export LS_COLORS
# Enable ls colors
if
[
"
$DISABLE_LS_COLORS
"
!=
"true"
]
then
# Find the option for using colors in ls, depending on the version: Linux or BSD
if
[[
"
$(
uname
-s
)
"
==
"NetBSD"
]]
;
then
# On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors);
# On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors);
# otherwise, leave ls as is, because NetBSD's ls doesn't support -G
gls
--color
-d
.
&>/dev/null 2>&1
&&
alias ls
=
'gls --color=tty'
elif
[[
"
$(
uname
-s
)
"
==
"OpenBSD"
]]
;
then
...
...
@@ -23,7 +22,7 @@ fi
#setopt no_beep
setopt auto_cd
setopt multios
setopt cdablevar
S
setopt cdablevar
s
if
[[
x
$WINDOW
!=
x
]]
then
...
...
@@ -43,4 +42,3 @@ ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is c
# Setup the prompt with pretty colors
setopt prompt_subst
plugins/git-prompt/git-prompt.plugin.zsh
View file @
2193135e
...
...
@@ -2,9 +2,6 @@
# http://github.com/olivierverdier/zsh-git-prompt
#
export
__GIT_PROMPT_DIR
=
$ZSH
/plugins/git-prompt
# Initialize colors.
autoload
-U
colors
colors
# Allow for functions in the prompt.
setopt PROMPT_SUBST
...
...
plugins/jump/jump.plugin.zsh
View file @
2193135e
...
...
@@ -27,7 +27,6 @@ unmark() {
rm
-i
"
$MARKPATH
/
$1
"
}
autoload colors
marks
()
{
for
link
in
$MARKPATH
/
*
(
@
)
;
do
local
markname
=
"
$fg
[cyan]
${
link
:t
}
$reset_color
"
...
...
themes/adben.zsh-theme
View file @
2193135e
...
...
@@ -69,17 +69,17 @@ function precmd {
#Choose from all databases, regardless of whether they are considered "offensive"
fortune
-a
}
#obtains the tip
#obtains the tip
ps1_command_tip
()
{
wget
-qO
- http://www.commandlinefu.com/commands/random/plaintext |
sed
1d |
sed
'/^$/d'
}
}
prompt_header
()
{
if
[[
"true"
==
"
$ENABLE_COMMAND_TIP
"
]]
;
then
ps1_command_tip
else
ps1_fortune
fi
}
fi
}
PROMPT_HEAD
=
"
${
RED_START
}${
PR_YELLOW
}
$(
prompt_header
)
${
PR_RESET
}
"
# set a simple variable to show when in screen
if
[[
-n
"
${
WINDOW
}
"
]]
;
then
...
...
@@ -99,11 +99,8 @@ prompt_context () {
set_prompt
()
{
# required for the prompt
setopt prompt_subst
autoload colors zsh/terminfo
if
[[
"
$terminfo
[colors]"
-gt
8
]]
;
then
colors
fi
autoload zsh/terminfo
# ######### PROMPT #########
PROMPT
=
'${PROMPT_HEAD}
${RED_START}$(prompt_context)
...
...
themes/apple.zsh-theme
View file @
2193135e
...
...
@@ -7,7 +7,6 @@ get_git_dirty() {
}
autoload -Uz vcs_info
autoload -U colors && colors
zstyle ':vcs_info:*' check-for-changes true
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
...
...
themes/gnzh.zsh-theme
View file @
2193135e
...
...
@@ -2,8 +2,7 @@
# Based on bira theme
# load some modules
autoload -U colors zsh/terminfo # Used in the colour alias below
colors
autoload -U zsh/terminfo # Used in the colour alias below
setopt prompt_subst
# make some aliases for the colours: (could use normal escape sequences too)
...
...
themes/half-life.zsh-theme
View file @
2193135e
...
...
@@ -13,8 +13,6 @@ function virtualenv_info {
PR_GIT_UPDATE=1
setopt prompt_subst
autoload colors
colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
...
...
themes/jonathan.zsh-theme
View file @
2193135e
...
...
@@ -44,10 +44,7 @@ setprompt () {
###
# See if we can use colors.
autoload colors zsh/terminfo
if [[ "$terminfo[colors]" -ge 8 ]]; then
colors
fi
autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
...
...
themes/kolo.zsh-theme
View file @
2193135e
autoload -U colors && colors
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'
...
...
themes/mikeh.zsh-theme
View file @
2193135e
setopt prompt_subst
autoload colors
colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
...
...
themes/simonoff.zsh-theme
View file @
2193135e
...
...
@@ -63,10 +63,7 @@ setprompt () {
###
# See if we can use colors.
autoload colors zsh/terminfo
if [[ "$terminfo[colors]" -ge 8 ]]; then
colors
fi
autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
...
...
themes/steeef.zsh-theme
View file @
2193135e
...
...
@@ -15,8 +15,6 @@ function virtualenv_info {
PR_GIT_UPDATE=1
setopt prompt_subst
autoload colors
colors
autoload -U add-zsh-hook
autoload -Uz vcs_info
...
...
themes/zhann.zsh-theme
View file @
2193135e
autoload -U colors && colors
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment