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
78bbf7a6
Commit
78bbf7a6
authored
Jun 14, 2015
by
Robby Russell
Browse files
Merge pull request #3809 from ncanceill/easymerge
Easy-to-Merge
parents
9eaf5110
a7e79824
Changes
47
Show whitespace changes
Inline
Side-by-side
plugins/zeus/zeus.plugin.zsh
View file @
78bbf7a6
...
...
@@ -19,8 +19,8 @@ alias zsr='zeus server'
alias
zerver
=
'zeus server'
# Rake
alias
zr
=
'zeus rake'
alias
zake
=
'zeus rake'
alias
zr
=
'
noglob
zeus rake'
alias
zake
=
'
noglob
zeus rake'
# Generate
alias
zg
=
'zeus generate'
...
...
themes/adben.zsh-theme
View file @
78bbf7a6
...
...
@@ -42,7 +42,7 @@ GREEN_BASE_START="${PR_RESET}${PR_GREY}>${PR_RESET}${PR_GREEN}>${PR_BRIGHT_GREEN
GREEN_START_P1
=
"
${
PR_RESET
}${
GREEN_BASE_START
}${
PR_RESET
}
"
DIVISION
=
"
${
PR_RESET
}${
PR_RED
}
<
${
PR_RESET
}
"
VCS_DIRTY_COLOR
=
"
${
PR_RESET
}${
PR_YELLOW
}
"
V
cs
_CLEAN_COLOR
=
"
${
PR_RESET
}${
PR_GREEN
}
"
V
CS
_CLEAN_COLOR
=
"
${
PR_RESET
}${
PR_GREEN
}
"
VCS_SUFIX_COLOR
=
"
${
PR_RESET
}${
PR_RED
}
›
${
PR_RESET
}
"
# ########## COLOR ###########
# ########## SVN ###########
...
...
themes/agnoster.zsh-theme
View file @
78bbf7a6
...
...
@@ -126,7 +126,7 @@ prompt_hg() {
if
`
hg st |
grep
-q
"^
\?
"
`
;
then
prompt_segment red black
st
=
'±'
elif
`
hg st |
grep
-q
"^
(M|A)
"
`
;
then
elif
`
hg st |
grep
-q
"^
[MA]
"
`
;
then
prompt_segment yellow black
st
=
'±'
else
...
...
themes/avit.zsh-theme
View file @
78bbf7a6
...
...
@@ -38,9 +38,8 @@ function _ruby_version() {
# Determine the time since last commit. If branch is clean,
# use a neutral color, otherwise colors will vary according to time.
function _git_time_since_commit() {
if git rev-parse --git-dir > /dev/null 2>&1; then
# Only proceed if there is actually a commit.
if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then
# Only proceed if there is actually a commit.
if git log -1 > /dev/null 2>&1; then
# Get the last commit.
last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
now=$(date +%s)
...
...
@@ -66,7 +65,6 @@ function _git_time_since_commit() {
color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL
echo "$color$commit_age%{$reset_color%}"
fi
fi
}
if [[ $USER == "root" ]]; then
...
...
@@ -99,4 +97,3 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[grey]%}"
export LSCOLORS="exfxcxdxbxegedabagacad"
export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
export GREP_COLOR='1;33'
themes/michelebologna.zsh-theme
View file @
78bbf7a6
# reference colors
GREEN="%{$fg_bold[green]%}"
RED="%{$fg_bold[red]%}"
CYAN="%{$fg_bold[cyan]%}"
YELLOW="%{$fg_bold[yellow]%}"
BLUE="%{$fg_bold[blue]%}"
MAGENTA="%{$fg_bold[magenta]%}"
WHITE="%{$fg_bold[white]%}"
COLOR_ARRAY=($GREEN $RED $CYAN $YELLOW $BLUE $MAGENTA $WHITE)
# color reset
RESET_COLOR="%{$reset_color%}"
# which color should be applied?
USERNAME_NORMAL_COLOR=$WHITE
USERNAME_ROOT_COLOR=$RED
HOSTNAME_NORMAL_COLOR=$BLUE
# uncomment next line if you want auto-generated hostname color
#for i in $HOST; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]]
HOSTNAME_ROOT_COLOR=$RED
HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR)
CURRENT_DIR_COLOR=$CYAN
# zsh commands
USERNAME_COMMAND="%n"
HOSTNAME_COMMAND="%m"
CURRENT_DIR="%~"
# output: colors + commands
USERNAME_OUTPUT="%(!..$USERNAME_NORMAL_COLOR$USERNAME_COMMAND$RESET_COLOR@)"
HOSTNAME_OUTPUT="$HOSTNAME_COLOR$HOSTNAME_COMMAND$RESET_COLOR"
CURRENT_DIR_OUTPUT="$CURRENT_DIR_COLOR$CURRENT_DIR"
LAST_COMMAND_OUTPUT="%(?.%(!.$RED.$GREEN).$YELLOW)"
# git theming
ZSH_THEME_GIT_PROMPT_PREFIX="("
# Michele Bologna's theme
# http://michelebologna.net
#
# This a theme for oh-my-zsh. Features a colored prompt with:
# * username@host: [jobs] [git] workdir %
# * hostname color is based on hostname characters. When using as root, the
# prompt shows only the hostname in red color.
# * [jobs], if applicable, counts the number of suspended jobs tty
# * [git], if applicable, represents the status of your git repo (more on that
# later)
# * '%' prompt will be green if last command return value is 0, yellow otherwise.
#
# git prompt is inspired by official git contrib prompt:
# https://github.com/git/git/tree/master/contrib/completion/git-prompt.sh
# and it adds:
# * the current branch
# * '%' if there are untracked files
# * '$' if there are stashed changes
# * '*' if there are modified files
# * '+' if there are added files
# * '<' if local repo is behind remote repo
# * '>' if local repo is ahead remote repo
# * '=' if local repo is equal to remote repo (in sync)
# * '<>' if local repo is diverged
local green="%{$fg_bold[green]%}"
local red="%{$fg_bold[red]%}"
local cyan="%{$fg_bold[cyan]%}"
local yellow="%{$fg_bold[yellow]%}"
local blue="%{$fg_bold[blue]%}"
local magenta="%{$fg_bold[magenta]%}"
local white="%{$fg_bold[white]%}"
local reset="%{$reset_color%}"
local -a color_array
color_array=($green $red $cyan $yellow $blue $magenta $white)
local username_normal_color=$white
local username_root_color=$red
local hostname_root_color=$red
# calculating hostname color with hostname characters
for i in `hostname`; local hostname_normal_color=$color_array[$[((#i))%7+1]]
local -a hostname_color
hostname_color=%(!.$hostname_root_color.$hostname_normal_color)
local current_dir_color=$blue
local username_command="%n"
local hostname_command="%m"
local current_dir="%~"
local username_output="%(!..$username_normal_color$username_command$reset@)"
local hostname_output="$hostname_color$hostname_command$reset"
local current_dir_output="$current_dir_color$current_dir$reset"
local jobs_bg="${red}fg: %j$reset"
local last_command_output="%(?.%(!.$red.$green).$yellow)"
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=")$RED*"
ZSH_THEME_GIT_PROMPT_CLEAN=")"
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
ZSH_THEME_GIT_PROMPT_MODIFIED="*"
ZSH_THEME_GIT_PROMPT_ADDED="+"
ZSH_THEME_GIT_PROMPT_STASHED="$"
ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="="
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">"
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<"
ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="<>"
# wrap all together
PROMPT='$USERNAME_OUTPUT$HOSTNAME_OUTPUT:$CURRENT_DIR_OUTPUT $LAST_COMMAND_OUTPUT%#$RESET_COLOR '
RPROMPT='%1(j.fg: [%j].) $GREEN$(git_prompt_info)$RESET_COLOR [%@]'
PROMPT='$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)'
PROMPT+='$(__git_ps1)'
PROMPT+=" $last_command_output%#$reset "
RPROMPT=''
themes/strug.zsh-theme
0 → 100644
View file @
78bbf7a6
# terminal coloring
export CLICOLOR=1
export LSCOLORS=dxFxCxDxBxegedabagacad
local git_branch='$(git_prompt_info)%{$reset_color%}$(git_remote_status)'
PROMPT="%{$fg[green]%}╭─%n@%m %{$reset_color%}%{$fg[yellow]%}in %~ %{$reset_color%}${git_branch}
%{$fg[green]%}╰\$ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}on "
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}%{$fg[red]%} ✘ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED=true
ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX="%{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=" +"
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR=%{$fg[green]%}
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE=" -"
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR=%{$fg[red]%}
tools/check_for_upgrade.sh
View file @
78bbf7a6
...
...
@@ -41,10 +41,9 @@ then
then
_upgrade_zsh
else
echo
"[Oh My Zsh] Would you like to check for updates?"
echo
"Type Y to update oh-my-zsh:
\c
"
echo
"[Oh My Zsh] Would you like to check for updates? [Y/n]:
\c
"
read
line
if
[
"
$line
"
=
Y
]
||
[
"
$line
"
=
y
]
;
then
if
[
"
$line
"
=
Y
]
||
[
"
$line
"
=
y
]
||
[
-z
"
$line
"
]
;
then
_upgrade_zsh
else
_update_zsh_update
...
...
Prev
1
2
3
Next
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