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
96ff8614
Commit
96ff8614
authored
Sep 23, 2015
by
Andrew Janke
Browse files
Merge branch 'master' into installer-cygwin-support-3
Conflicts: tools/install.sh
parents
502f08b5
76a26a2a
Changes
112
Hide whitespace changes
Inline
Side-by-side
themes/amuse.zsh-theme
View file @
96ff8614
...
...
@@ -18,4 +18,11 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!"
ZSH_THEME_GIT_PROMPT_UNTRACKED
=
"%{
$fg
[green]%}?"
ZSH_THEME_GIT_PROMPT_CLEAN
=
""
RPROMPT
=
'%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}'
if
[
-e
~/.rvm/bin/rvm-prompt
]
;
then
RPROMPT
=
'%{$fg_bold[red]%}‹$(~/.rvm/bin/rvm-prompt i v)›%{$reset_color%}'
else
if
which rbenv &> /dev/null
;
then
RPROMPT
=
'%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}'
fi
fi
themes/candy-kingdom.zsh-theme
View file @
96ff8614
...
...
@@ -13,7 +13,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
}
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-
$
HOST}
}
PROMPT='
...
...
themes/cypher.zsh-theme
View file @
96ff8614
# Based on evan's prompt
# Shows the exit status of the last command if non-zero
# Uses "#" instead of "»" when running with elevated privileges
PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . ${fg[red]}%? )%{${fg[blue]}%}»%{${reset_color}%} "
PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. .
%{
${fg[red]}%
}%
? )%{${fg[blue]}%}»%{${reset_color}%} "
themes/dogenpunk.zsh-theme
View file @
96ff8614
...
...
@@ -3,7 +3,7 @@
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%}
ओम्
%{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info)
PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%}
ॐ
%{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info)
%{$fg[red]%}%!%{$reset_color%} $(prompt_char) '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}"
...
...
themes/emotty.zsh-theme
0 → 100644
View file @
96ff8614
#!/usr/bin/env zsh
# ------------------------------------------------------------------------------
# FILE: emotty.zsh-theme
# DESCRIPTION: A varying emoji based theme
# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net)
# VERSION: 1.0.0
# DEPENDS: emotty plugin
# RECOMMENDS: Hasklig font
#
# This theme shows a different emoji for each tty at the main prompt.
#
# There are pre-defined different emoji sets to choose from, e.g.:
# emoji, stellar, floral, zodiac, love (see emotty plugin).
#
# To choose a different emotty set than the default (emoji)
# % export emotty_set=nature
#
# For the superuser (root) this theme shows a designated indicator
# and switches the foreground color to red
# (see root_prompt variable, default: skull).
# But you are using sudo (8) instead of designated a root shell, right‽
#
# When logged in via SSH the main prompt also shows the user- and hostname.
#
# The exit status of the last failed command is displayed in the window title
# along with an indicator (see warn_glyph variable, default: collision symbol).
# To clear it just run: $NULL, true or :
#
# The right prompt shows the current working directory (3 levels up) in cyan.
#
# When in a git repository the main prompt shows the current branch name
# with a branch indicator in yellow
# (see vcs_branch_glyph variable, default: Hasklig branch glyph).
#
# If there are modified files the prompt switches to red and shows an unstaged
# indicator (see vcs_unstaged_glyph variable, default: circled letter M).
#
# If there are staged files the prompt switches to green and shows an staged
# indicator (see vcs_staged_glyph variable, default: high voltage sign).
#
# In a git repository the right prompt shows the repository name in bold and
# prepends the current working directory subpath within the repository.
#
# When git currently performs an action such as merge or rebase, the action is
# displayed in red instead of the branch name and a special action indicator
# is shown (see vcs_action_glyph variable, default: chevron).
# ------------------------------------------------------------------------------
user_prompt
=
"
$(
emotty
)
"
root_prompt
=
"
$emoji
[skull]"
warn_prompt
=
"
$emoji
[collision_symbol]"
vcs_unstaged_glyph
=
"%{
$emoji
[circled_latin_capital_letter_m]
$emoji2
[emoji_style] %2G%}"
vcs_staged_glyph
=
"%{
$emoji
[high_voltage_sign] %2G%}"
vcs_branch_glyph
=
$(
print
-P
$'
\U
e0a0'
)
#
vcs_action_glyph
=
$(
print
-P
$'
\U
276f'
)
# ❯
red
=
"
$FG
[001]"
yellow
=
"
$FG
[003]"
green
=
"
$FG
[002]"
cyan
=
"
$FG
[014]"
prompt_glyph
=
"%{%(#.
${
root_prompt
}
.
${
user_prompt
}
) %2G%}"
# Uncomment the next line if you also like to see the warn_prompt in the prompt on the right.
#last_command_failed="%(?.. %F{red}%1{${warn_prompt} %1G%}%?%f)"
setopt promptsubst
autoload
-U
add-zsh-hook
autoload
-Uz
vcs_info
zstyle
':vcs_info:*'
enable
git
#hg svn cvs
zstyle
':vcs_info:*'
get-revision
false
zstyle
':vcs_info:*'
check-for-changes
true
zstyle
':vcs_info:git:*'
unstagedstr
"
${
red
}${
vcs_unstaged_glyph
}
"
zstyle
':vcs_info:*'
stagedstr
"
${
green
}${
vcs_staged_glyph
}
"
# %(K|F){color} set (back|fore)ground color
# %(k|f) reset (back|fore)ground color
zstyle
':vcs_info:*'
max-exports 3
zstyle
':vcs_info:*'
nvcsformats
"
${
prompt_glyph
}
"
'%3~'
''
zstyle
':vcs_info:*'
formats
"
${
yellow
}
%u%c%b
${
vcs_branch_glyph
}
%f"
'%S|'
"
$FX
[bold]%r
$FX
[no-bold]"
zstyle
':vcs_info:*'
actionformats
"
${
red
}
%K{white}%a
${
vcs_action_glyph
}
%k%f"
'%S|'
"
$FX
[bold]%r
$FX
[no-bold]"
red_if_root
=
"%(!.%F{red}.)"
sshuser_on_host
=
"
${
SSH_TTY
:+%
(!.
$red
.
$yellow
)%n@%m
$reset_color
}
"
PROMPT
=
'${sshuser_on_host}${vcs_info_msg_0_}${red_if_root} '
RPROMPT
=
'${cyan}${vcs_info_msg_1_##.|}${vcs_info_msg_2_}%f${last_command_failed}'
emotty_title
()
{
title
"
${${
?/[^0]*/
$warn_prompt
$?
}
/0/
${
prompt_glyph
}}
"
}
add-zsh-hook precmd emotty_title
add-zsh-hook precmd vcs_info
# vim:ft=zsh ts=2 sw=2 sts=2
themes/fino-time.zsh-theme
View file @
96ff8614
...
...
@@ -21,7 +21,7 @@ function prompt_char {
}
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-
$
HOST}
}
...
...
themes/fino.zsh-theme
View file @
96ff8614
...
...
@@ -17,7 +17,7 @@ function prompt_char {
}
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST}
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-
$
HOST}
}
local ruby_env=''
...
...
themes/gnzh.zsh-theme
View file @
96ff8614
# ZSH Theme - Preview: http://dl.dropbox.com/u/4109351/pics/gnzh-zsh-theme.png
# Based on bira theme
# load some modules
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)
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval PR_$color='%{$fg[${(L)color}]%}'
done
eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
eval PR_BOLD="%{$terminfo[bold]%}"
() {
local PR_USER PR_USER_OP PR_PROMPT PR_HOST
# Check the UID
if [[ $UID -ne 0 ]]; then # normal user
eval
PR_USER='
${PR_GREEN}%n${PR_NO_COLOR}
'
eval
PR_USER_OP='
${PR_GREEN}%#${PR_NO_COLOR}
'
local
PR_PROMPT='
$PR_NO_COLOR➤ $PR_NO_COLOR
'
PR_USER='
%F{green}%n%f
'
PR_USER_OP='
%F{green}%#%f
'
PR_PROMPT='
%f➤ %f
'
else # root
eval
PR_USER='
${PR_RED}%n${PR_NO_COLOR}
'
eval
PR_USER_OP='
${PR_RED}%#${PR_NO_COLOR}
'
local
PR_PROMPT='
$PR_RED➤ $PR_NO_COLOR
'
PR_USER='
%F{red}%n%f
'
PR_USER_OP='
%F{red}%#%f
'
PR_PROMPT='
%F{red}➤ %f
'
fi
# Check if we are on SSH or not
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
eval
PR_HOST='
${PR_YELLOW}%M${PR_NO_COLOR}
' #SSH
PR_HOST='
%F{red}%M%f
' #
SSH
else
eval
PR_HOST='
${PR_GREEN}%M${PR_NO_COLOR}
' # no SSH
PR_HOST='
%F{green}%M%f
' # no SSH
fi
local return_code="%(?..%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})"
local user_host='${PR_USER}${PR_CYAN}@${PR_HOST}'
local current_dir='%{$PR_BOLD$PR_BLUE%}%~%{$PR_NO_COLOR%}'
local return_code="%(?..%F{red}%? ↵%f)"
local user_host="${PR_USER}%F{cyan}@${PR_HOST}"
local current_dir="%B%F{blue}%~%f%b"
local rvm_ruby=''
if ${HOME}/.rvm/bin/rvm-prompt &> /dev/null; then # detect local
user
rvm installation
rvm_ruby='%
{$PR_RED%
}‹$(${HOME}/.rvm/bin/rvm-prompt i v g s)›%
{$PR_NO_COLOR%}
'
elif which rvm-prompt &> /dev/null; then # detect sysem-wide rvm installation
rvm_ruby='%
{$PR_RED%
}‹$(rvm-prompt i v g s)›%
{$PR_NO_COLOR%}
'
elif which rbenv &> /dev/null; then # detect Simple Ruby Version
m
anagement
rvm_ruby='%
{$PR_RED%
}‹$(rbenv version | sed -e "s/ (set.*$//")›%
{$PR_NO_COLOR%}
'
if ${HOME}/.rvm/bin/rvm-prompt &> /dev/null; then # detect
user-
local rvm installation
rvm_ruby='%
F{red
}‹$(${HOME}/.rvm/bin/rvm-prompt i v g s)›%
f
'
elif which rvm-prompt &> /dev/null; then # detect sys
t
em-wide rvm installation
rvm_ruby='%
F{red
}‹$(rvm-prompt i v g s)›%
f
'
elif which rbenv &> /dev/null; then # detect Simple Ruby Version
M
anagement
rvm_ruby='%
F{red
}‹$(rbenv version | sed -e "s/ (set.*$//")›%
f
'
fi
local git_branch='$(git_prompt_info)
%{$PR_NO_COLOR%}
'
local git_branch='$(git_prompt_info)'
#PROMPT="${user_host} ${current_dir} ${rvm_ruby} ${git_branch}$PR_PROMPT "
PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
╰─$PR_PROMPT "
RPS1="${return_code}"
RPROMPT="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %f"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$PR_YELLOW%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$PR_NO_COLOR%}"
}
themes/michelebologna.zsh-theme
View file @
96ff8614
...
...
@@ -59,16 +59,17 @@ ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
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_UNTRACKED="
$blue
%%"
ZSH_THEME_GIT_PROMPT_MODIFIED="
$red
*"
ZSH_THEME_GIT_PROMPT_ADDED="
$green
+"
ZSH_THEME_GIT_PROMPT_STASHED="$
blue$
"
ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="
$green
="
ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">"
ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<"
ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="<>"
ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="
$red
<>"
PROMPT='$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)'
PROMPT+='$(__git_ps1)'
GIT_PROMPT='$(out=$(git_prompt_info)$(git_prompt_status)$(git_remote_status);if [[ -n $out ]]; then printf %s " $white($green$out$white)$reset";fi)'
PROMPT+="$GIT_PROMPT"
PROMPT+=" $last_command_output%#$reset "
RPROMPT=''
themes/steeef.zsh-theme
View file @
96ff8614
...
...
@@ -10,7 +10,7 @@
export VIRTUAL_ENV_DISABLE_PROMPT=1
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('
$fg[
blue
]
`basename $VIRTUAL_ENV`%
{$reset_color%}
') '
[ $VIRTUAL_ENV ] && echo '('
%F{
blue
}
`basename $VIRTUAL_ENV`%
f
') '
}
PR_GIT_UPDATE=1
...
...
@@ -20,18 +20,18 @@ autoload -U add-zsh-hook
autoload -Uz vcs_info
#use extended color pallete if available
if [[ $
TERM = *256color* || $TERM = *rxvt*
]]; then
if [[ $
terminfo[colors] -ge 256
]]; then
turquoise="%F{81}"
orange="%F{166}"
purple="%F{135}"
hotpink="%F{161}"
limegreen="%F{118}"
else
turquoise="
$fg[
cyan
]
"
orange="
$fg[
yellow
]
"
purple="
$fg[
magenta
]
"
hotpink="
$fg[
red
]
"
limegreen="
$fg[
green
]
"
turquoise="
%F{
cyan
}
"
orange="
%F{
yellow
}
"
purple="
%F{
magenta
}
"
hotpink="
%F{
red
}
"
limegreen="
%F{
green
}
"
fi
# enable VCS systems you use
...
...
@@ -48,7 +48,7 @@ zstyle ':vcs_info:*:prompt:*' check-for-changes true
# %a - action (e.g. rebase-i)
# %R - repository path
# %S - path in the repository
PR_RST="%
{${reset_color}%}
"
PR_RST="%
f
"
FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
FMT_ACTION="(%{$limegreen%}%a${PR_RST})"
FMT_UNSTAGED="%{$orange%}●"
...
...
@@ -96,5 +96,5 @@ function steeef_precmd {
add-zsh-hook precmd steeef_precmd
PROMPT=$'
%{$purple%}%n
%{$reset_color%
} at %{$orange%}%m
%{$reset_color%
} in %{$limegreen%}%~
%{$reset_color%
} $vcs_info_msg_0_$(virtualenv_info)
%{$reset_color%}
%{$purple%}%n
${PR_RST
} at %{$orange%}%m
${PR_RST
} in %{$limegreen%}%~
${PR_RST
} $vcs_info_msg_0_$(virtualenv_info)
$ '
tools/install.sh
View file @
96ff8614
set
-e
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
ncolors
=
$(
tput colors
)
if
[
-t
1
]
&&
[
-n
"
$ncolors
"
]
&&
[
"
$ncolors
"
-ge
8
]
;
then
RED
=
"
$(
tput setaf 1
)
"
GREEN
=
"
$(
tput setaf 2
)
"
YELLOW
=
"
$(
tput setaf 3
)
"
BLUE
=
"
$(
tput setaf 4
)
"
BOLD
=
"
$(
tput bold
)
"
NORMAL
=
"
$(
tput sgr0
)
"
else
RED
=
""
GREEN
=
""
YELLOW
=
""
BLUE
=
""
BOLD
=
""
NORMAL
=
""
fi
CHECK_ZSH_INSTALLED
=
$(
grep
/zsh
$
/etc/shells |
wc
-l
)
if
[
!
$CHECK_ZSH_INSTALLED
-ge
1
]
;
then
printf
"
${
YELLOW
}
Zsh is not installed!
${
NORMAL
}
Please install zsh first!
\n
"
exit
fi
unset
CHECK_ZSH_INSTALLED
if
[
!
-n
"
$ZSH
"
]
;
then
ZSH
=
~/.oh-my-zsh
fi
if
[
-d
"
$ZSH
"
]
;
then
echo
"
\0
33[0;33mYou already have Oh My Zsh installed.
\0
33[0m You'll need to remove
$ZSH
if you want to install"
printf
"
${
YELLOW
}
You already have Oh My Zsh installed.
${
NORMAL
}
\n
"
printf
"You'll need to remove
$ZSH
if you want to re-install.
\n
"
exit
fi
echo
"
\0
33[0;34mCloning Oh My Zsh...
\0
33[0m"
# Prevent the cloned repository from having insecure permissions. Failing to do
# so causes compinit() calls to fail with "command not found: compdef" errors
# for users with insecure umasks (e.g., "002", allowing group writability). Note
# that this will be ignored under Cygwin by default, as Windows ACLs take
# precedence over umasks except for filesystems mounted with option "noacl".
umask
g-w,o-w
printf
"
${
BLUE
}
Cloning Oh My Zsh...
${
NORMAL
}
\n
"
hash
git
>
/dev/null 2>&1
||
{
echo
"Error: git is not installed"
exit
1
}
env
git clone
--depth
=
1 https://github.com/robbyrussell/oh-my-zsh.git
$ZSH
||
{
printf
"Error: git clone of oh-my-zsh repo failed
\n
"
exit
1
}
# The Windows (MSYS) Git is not compatible with normal use on cygwin
if
[
"
$OSTYPE
"
=
cygwin
]
;
then
if
git
--version
|
grep
msysgit
>
/dev/null
;
then
...
...
@@ -22,48 +60,54 @@ if [ "$OSTYPE" = cygwin ]; then
exit
1
fi
fi
env
git clone
--depth
=
1 https://github.com/robbyrussell/oh-my-zsh.git
$ZSH
||
{
echo
"Error: git clone of oh-my-zsh repo failed"
exit
1
}
echo
"
\0
33[0;34m
Looking for an existing zsh config...
\0
33[0m
"
printf
"
${
BLUE
}
Looking for an existing zsh config...
${
NORMAL
}
\n
"
if
[
-f
~/.zshrc
]
||
[
-h
~/.zshrc
]
;
then
echo
"
\0
33[0;33mFound ~/.zshrc.
\0
33[0m
\0
33[0;32m
Backing up to ~/.zshrc.pre-oh-my-zsh
\0
33[0m
"
;
printf
"
${
YELLOW
}
Found ~/.zshrc.
${
NORMAL
}
${
GREEN
}
Backing up to ~/.zshrc.pre-oh-my-zsh
${
NORMAL
}
\n
"
;
mv
~/.zshrc ~/.zshrc.pre-oh-my-zsh
;
fi
echo
"
\0
33[0;34m
Using the Oh My Zsh template file and adding it to ~/.zshrc
\0
33[0m
"
printf
"
${
BLUE
}
Using the Oh My Zsh template file and adding it to ~/.zshrc
${
NORMAL
}
\n
"
cp
$ZSH
/templates/zshrc.zsh-template ~/.zshrc
sed
-i
-e
"/^export ZSH=/ c
\\
sed
"/^export ZSH=/ c
\\
export ZSH=
$ZSH
"
~/.zshrc
"
~/.zshrc
>
~/.zshrc-omztemp
mv
-f
~/.zshrc-omztemp ~/.zshrc
echo
"
\0
33[0;34m
Copying your current PATH and adding it to the end of ~/.zshrc for you.
\0
33[0m
"
sed
-i
-e
"/export PATH=/ c
\\
printf
"
${
BLUE
}
Copying your current PATH and adding it to the end of ~/.zshrc for you.
${
NORMAL
}
\n
"
sed
"/export PATH=/ c
\\
export PATH=
\"
$PATH
\"
"
~/.zshrc
"
~/.zshrc
>
~/.zshrc-omztemp
mv
-f
~/.zshrc-omztemp ~/.zshrc
# If this user's login shell is not already "zsh", attempt to switch.
TEST_CURRENT_SHELL
=
$(
expr
"
$SHELL
"
:
'.*/\(.*\)'
)
if
[
"
$TEST_CURRENT_SHELL
"
!=
"zsh"
]
;
then
# If this platform provides a "chsh" command (not Cygwin), do it, man!
if
hash
chsh
>
/dev/null 2>&1
;
then
echo
"
\0
33[0;34m
Time to change your default shell to zsh!
\0
33[0m
"
printf
"
${
BLUE
}
Time to change your default shell to zsh!
${
NORMAL
}
\n
"
chsh
-s
$(
grep
/zsh
$
/etc/shells |
tail
-1
)
# Else, suggest the user do so manually.
else
echo
"I can't change your shell automatically because this system does not have chsh."
echo
"Please edit /etc/passwd to set
your default shell to zsh
.
"
printf
"I can't change your shell automatically because this system does not have chsh.
\n
"
printf
"
${
BLUE
}
Please manually change
your default shell to zsh
!
${
NORMAL
}
\n
"
fi
fi
unset
TEST_CURRENT_SHELL
echo
"
\0
33[0;32m"
' __ __ '
"
\0
33[0m"
echo
"
\0
33[0;32m"
' ____ / /_ ____ ___ __ __ ____ _____/ /_ '
"
\0
33[0m"
echo
"
\0
33[0;32m"
' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '
"
\0
33[0m"
echo
"
\0
33[0;32m"
'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '
"
\0
33[0m"
echo
"
\0
33[0;32m"
'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '
"
\0
33[0m"
echo
"
\0
33[0;32m"
' /____/ ....is now installed!'
"
\0
33[0m"
echo
"
\n\n
\0
33[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.
\0
33[0m"
echo
"
\n\n
\0
33[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.
\0
33[0m"
echo
"
\n\n
\0
33[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.
\0
33[0m"
printf
"
${
GREEN
}
"
echo
' __ __ '
echo
' ____ / /_ ____ ___ __ __ ____ _____/ /_ '
echo
' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '
echo
'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '
echo
'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '
echo
' /____/ ....is now installed!'
echo
''
echo
''
echo
'Please look over the ~/.zshrc file to select plugins, themes, and options.'
echo
''
echo
'p.s. Follow us at https://twitter.com/ohmyzsh.'
echo
''
echo
'p.p.s. Get stickers and t-shirts at http://shop.planetargon.com.'
echo
''
printf
"
${
NORMAL
}
"
env
zsh
.
~/.zshrc
tools/upgrade.sh
View file @
96ff8614
printf
'\033[0;34m%s\033[0m\n'
"Upgrading Oh My Zsh"
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
ncolors
=
$(
tput colors
)
if
[
-t
1
]
&&
[
-n
"
$ncolors
"
]
&&
[
"
$ncolors
"
-ge
8
]
;
then
RED
=
"
$(
tput setaf 1
)
"
GREEN
=
"
$(
tput setaf 2
)
"
YELLOW
=
"
$(
tput setaf 3
)
"
BLUE
=
"
$(
tput setaf 4
)
"
BOLD
=
"
$(
tput bold
)
"
NORMAL
=
"
$(
tput sgr0
)
"
else
RED
=
""
GREEN
=
""
YELLOW
=
""
BLUE
=
""
BOLD
=
""
NORMAL
=
""
fi
printf
"
${
BLUE
}
%s
${
NORMAL
}
\n
"
"Upgrading Oh My Zsh"
cd
"
$ZSH
"
if
git pull
--rebase
--stat
origin master
then
printf
'\033[0;32m%s\033[0m\n'
' __ __ '
printf
'\033[0;32m%s\033[0m\n'
' ____ / /_ ____ ___ __ __ ____ _____/ /_ '
printf
'\033[0;32m%s\033[0m\n'
' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '
printf
'\033[0;32m%s\033[0m\n'
'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '
printf
'\033[0;32m%s\033[0m\n'
'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '
printf
'\033[0;32m%s\033[0m\n'
' /____/ '
printf
'\033[0;34m%s\033[0m\n'
'Hooray! Oh My Zsh has been updated and/or is at the current version.'
printf
'\033[0;34m%s\033[1m%s\033[0m\n'
'To keep up on the latest news and updates, follow us on twitter: '
'http://twitter.com/ohmyzsh'
printf
'\033[0;34m%s\033[1m%s\033[0m\n'
'Get your Oh My Zsh swag at: '
'http://shop.planetargon.com/'
printf
'%s'
"
$GREEN
"
printf
'%s\n'
' __ __ '
printf
'%s\n'
' ____ / /_ ____ ___ __ __ ____ _____/ /_ '
printf
'%s\n'
' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '
printf
'%s\n'
'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '
printf
'%s\n'
'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '
printf
'%s\n'
' /____/ '
printf
"
${
BLUE
}
%s
\n
"
"Hooray! Oh My Zsh has been updated and/or is at the current version."
printf
"
${
BLUE
}${
BOLD
}
%s
${
NORMAL
}
\n
"
"To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh"
printf
"
${
BLUE
}${
BOLD
}
%s
${
NORMAL
}
\n
"
"Get your Oh My Zsh swag at: http://shop.planetargon.com/"
else
printf
'\033[0;31m%s\033[0m
\n
'
'There was an error updating. Try again later?'
printf
"
${
RED
}
%s
${
NORMAL
}
\n
"
'There was an error updating. Try again later?'
fi
Prev
1
2
3
4
5
6
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