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
Oh My Zsh
Commits
8c95c523
Unverified
Commit
8c95c523
authored
Nov 16, 2018
by
Kozlov Alexander
Committed by
GitHub
Nov 16, 2018
Browse files
Merge branch 'master' into master
parents
dd30cf10
3d8f2bda
Changes
371
Hide whitespace changes
Inline
Side-by-side
themes/sorin.zsh-theme
View file @
8c95c523
# sorin.zsh-theme
# sorin.zsh-theme
# screenshot: http://i.imgur.com/aipDQ.png
# screenshot: http
s
://i.imgur.com/aipDQ.png
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}❯)%{$reset_color%} '
PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}❯)%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}"
...
@@ -20,10 +20,10 @@ if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
...
@@ -20,10 +20,10 @@ if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
else
else
MODE_INDICATOR="❮❮❮"
MODE_INDICATOR="❮❮❮"
local return_status="%(?::⏎)"
local return_status="%(?::⏎)"
PROMPT='%c$(git_prompt_info) %(!.#.❯) '
PROMPT='%c$(git_prompt_info) %(!.#.❯) '
ZSH_THEME_GIT_PROMPT_PREFIX=" git:"
ZSH_THEME_GIT_PROMPT_PREFIX=" git:"
...
...
themes/sporty_256.zsh-theme
View file @
8c95c523
# zsh theme requires 256 color enabled terminal
# zsh theme requires 256 color enabled terminal
# i.e TERM=xterm-256color
# i.e TERM=xterm-256color
# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/
# Preview - http
s
://www.flickr.com/photos/adelcampo/4556482563/sizes/o/
# based on robbyrussell's shell but louder!
# based on robbyrussell's shell but louder!
PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f
PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f
...
...
themes/steeef.zsh-theme
View file @
8c95c523
# prompt style and colors based on Steve Losh's Prose theme:
# prompt style and colors based on Steve Losh's Prose theme:
# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme
# http
s
://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme
#
#
# vcs_info modifications from Bart Trojanowski's zsh prompt:
# vcs_info modifications from Bart Trojanowski's zsh prompt:
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt
#
#
# git untracked files modification from Brian Carper:
# git untracked files modification from Brian Carper:
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
# http
s
://briancarper.net/blog/570/git-info-in-your-zsh-prompt
export VIRTUAL_ENV_DISABLE_PROMPT=1
export VIRTUAL_ENV_DISABLE_PROMPT=1
...
@@ -62,10 +62,13 @@ zstyle ':vcs_info:*:prompt:*' nvcsformats ""
...
@@ -62,10 +62,13 @@ zstyle ':vcs_info:*:prompt:*' nvcsformats ""
function steeef_preexec {
function steeef_preexec {
case "$
(history $HISTCMD)
" in
case "$
2
" in
*git*)
*git*)
PR_GIT_UPDATE=1
PR_GIT_UPDATE=1
;;
;;
*hub*)
PR_GIT_UPDATE=1
;;
*svn*)
*svn*)
PR_GIT_UPDATE=1
PR_GIT_UPDATE=1
;;
;;
...
...
themes/sunaku.zsh-theme
View file @
8c95c523
# Git-centric variation of the "fishy" theme.
# Git-centric variation of the "fishy" theme.
# See screenshot at http://ompldr.org/vOHcwZg
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+"
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!"
...
...
themes/tonotdo.zsh-theme
View file @
8c95c523
...
@@ -7,6 +7,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX=""
...
@@ -7,6 +7,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}✗%{$fg_bold[blue]%})"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}✗%{$fg_bold[blue]%})"
# LS colors, made with http://geoff.greer.fm/lscolors/
# LS colors, made with http
s
://geoff.greer.fm/lscolors/
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LSCOLORS="Gxfxcxdxbxegedabagacad"
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:'
\ No newline at end of file
themes/trapd00r.zsh-theme
View file @
8c95c523
# trapd00r.zsh-theme
# trapd00r.zsh-theme
#
#
# This theme needs a terminal supporting 256 colors as well as unicode. It also
# This theme needs a terminal supporting 256 colors as well as unicode.
# needs the script that splits up the current path and makes it fancy as located
# In order to avoid external dependencies, it also has a zsh version of
# here: https://github.com/trapd00r/utils/blob/master/zsh_path
# the perl script at https://github.com/trapd00r/utils/blob/master/zsh_path,
# which splits up the current path and makes it fancy.
#
#
# By default it spans over two lines like so:
# By default it spans over two lines like so:
#
#
...
@@ -20,37 +21,77 @@
...
@@ -20,37 +21,77 @@
autoload -U add-zsh-hook
autoload -U add-zsh-hook
autoload -Uz vcs_info
autoload -Uz vcs_info
local
c0
=
$
(
printf
"
\e
[m
"
)
local c0=$
'
\e[m
'
local
c1
=
$
(
printf
"
\e
[38;5;245m
"
)
local c1=$
'
\e[38;5;245m
'
local
c2
=
$
(
printf
"
\e
[38;5;250m
"
)
local c2=$
'
\e[38;5;250m
'
local
c3
=
$
(
printf
"
\e
[38;5;242m
"
)
local c3=$
'
\e[38;5;242m
'
local
c4
=
$
(
printf
"
\e
[38;5;197m
"
)
local c4=$
'
\e[38;5;197m
'
local
c5
=
$
(
printf
"
\e
[38;5;225m
"
)
local c5=$
'
\e[38;5;225m
'
local
c6
=
$
(
printf
"
\e
[38;5;240m
"
)
local c6=$
'
\e[38;5;240m
'
local
c7
=
$
(
printf
"
\e
[38;5;242m
"
)
local c7=$
'
\e[38;5;242m
'
local
c8
=
$
(
printf
"
\e
[38;5;244m
"
)
local c8=$
'
\e[38;5;244m
'
local
c9
=
$
(
printf
"
\e
[38;5;162m
"
)
local c9=$
'
\e[38;5;162m
'
local
c10
=
$
(
printf
"
\e
[1m
"
)
local c10=$
'
\e[1m
'
local
c11
=
$
(
printf
"
\e
[38;5;208m
\e
[1m
"
)
local c11=$
'
\e[38;5;208m\e[1m
'
local
c12
=
$
(
printf
"
\e
[38;5;142m
\e
[1m
"
)
local c12=$
'
\e[38;5;142m\e[1m
'
local
c13
=
$
(
printf
"
\e
[38;5;196m
\e
[1m
"
)
local c13=$
'
\e[38;5;196m\e[1m
'
# We don't want to use the extended colorset in the TTY / VC.
zsh_path() {
if
[
"
$TERM
"
=
"linux"
]
;
then
local colors
c1
=
$(
printf
"
\e
[34;1m"
)
colors=$(echoti colors)
c2
=
$(
printf
"
\e
[35m"
)
c3
=
$(
printf
"
\e
[31m"
)
local -A yellow
c4
=
$(
printf
"
\e
[31;1m"
)
yellow=(
c5
=
$(
printf
"
\e
[32m"
)
1 '%F{228}' 2 '%F{222}' 3 '%F{192}' 4 '%F{186}'
c6
=
$(
printf
"
\e
[32;1m"
)
5 '%F{227}' 6 '%F{221}' 7 '%F{191}' 8 '%F{185}'
c7
=
$(
printf
"
\e
[33m"
)
9 '%F{226}' 10 '%F{220}' 11 '%F{190}' 12 '%F{184}'
c8
=
$(
printf
"
\e
[33;1m"
)
13 '%F{214}' 14 '%F{178}' 15 '%F{208}' 16 '%F{172}'
c9
=
$(
printf
"
\e
[34m"
)
17 '%F{202}' 18 '%F{166}'
)
local dir i=1
for dir (${(s:/:)PWD}); do
if [[ $i -eq 1 ]]; then
if [[ $colors -ge 256 ]]; then
print -Pn "%F{065}%B /%b"
else
print -Pn "\e[31;1m /"
fi
else
if [[ $colors -ge 256 ]]; then
print -Pn "${yellow[$i]:-%f} » "
else
print -Pn "%F{yellow} > "
fi
fi
(( i++ ))
if [[ $colors -ge 256 ]]; then
print -Pn "%F{065}$dir"
else
print -Pn "%F{blue}$dir"
fi
done
print -Pn "%f"
}
c11
=
$(
printf
"
\e
[35;1m"
)
c12
=
$(
printf
"
\e
[36m"
)
# We don't want to use the extended colorset in the TTY / VC.
c13
=
$(
printf
"
\e
[31;1m"
)
if [ "$TERM" = linux ]; then
c1=$'\e[34;1m'
c2=$'\e[35m'
c3=$'\e[31m'
c4=$'\e[31;1m'
c5=$'\e[32m'
c6=$'\e[32;1m'
c7=$'\e[33m'
c8=$'\e[33;1m'
c9=$'\e[34m'
c11=$'\e[35;1m'
c12=$'\e[36m'
c13=$'\e[31;1m'
fi
fi
zstyle ':vcs_info:*' actionformats \
zstyle ':vcs_info:*' actionformats \
...
@@ -70,14 +111,12 @@ prompt_jnrowe_precmd () {
...
@@ -70,14 +111,12 @@ prompt_jnrowe_precmd () {
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
> '
> '
# modified, to be committed
# modified, to be committed
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
PROMPT='${vcs_info_msg_0_}%{$30%} %{$bg_bold[red]%}%{$fg_bold[cyan]%}C%{$fg_bold[black]%}OMMIT%{$reset_color%}
PROMPT='${vcs_info_msg_0_}%{$30%} %{$bg_bold[red]%}%{$fg_bold[cyan]%}C%{$fg_bold[black]%}OMMIT%{$reset_color%}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
> '
> '
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
PROMPT='${vcs_info_msg_0_}%{$bg_bold[red]%}%{$fg_bold[blue]%}D%{$fg_bold[black]%}IRTY%{$reset_color%}
PROMPT='${vcs_info_msg_0_}%{$bg_bold[red]%}%{$fg_bold[blue]%}D%{$fg_bold[black]%}IRTY%{$reset_color%}
...
@@ -88,7 +127,5 @@ prompt_jnrowe_precmd () {
...
@@ -88,7 +127,5 @@ prompt_jnrowe_precmd () {
PROMPT='${vcs_info_msg_0_}
PROMPT='${vcs_info_msg_0_}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
> '
> '
fi
fi
}
}
# vim: set ft=zsh sw=2 et tw=0:
themes/xiong-chiamiov-plus.zsh-theme
View file @
8c95c523
# user, host, full path, and time/date
# user, host, full path, and time/date
# on two lines for easier vgrepping
# on two lines for easier vgrepping
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
# entry in a nice long thread on the Arch Linux forums: http
s
://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(git_prompt_info)>%{\e[0m%}%b '
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(git_prompt_info)>%{\e[0m%}%b '
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
themes/xiong-chiamiov.zsh-theme
View file @
8c95c523
# user, host, full path, and time/date
# user, host, full path, and time/date
# on two lines for easier vgrepping
# on two lines for easier vgrepping
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
# entry in a nice long thread on the Arch Linux forums: http
s
://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]>%{\e[0m%}%b '
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]>%{\e[0m%}%b '
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
tools/check_for_upgrade.sh
View file @
8c95c523
...
@@ -7,7 +7,7 @@ function _current_epoch() {
...
@@ -7,7 +7,7 @@ function _current_epoch() {
}
}
function
_update_zsh_update
()
{
function
_update_zsh_update
()
{
echo
"LAST_EPOCH=
$(
_current_epoch
)
"
>!
~
/.zsh-update
echo
"LAST_EPOCH=
$(
_current_epoch
)
"
>!
${
ZSH_CACHE_DIR
}
/.zsh-update
}
}
function
_upgrade_zsh
()
{
function
_upgrade_zsh
()
{
...
@@ -30,11 +30,11 @@ fi
...
@@ -30,11 +30,11 @@ fi
whence git
>
/dev/null
||
return
0
whence git
>
/dev/null
||
return
0
if
mkdir
"
$ZSH
/log/update.lock"
2>/dev/null
;
then
if
mkdir
"
$ZSH
/log/update.lock"
2>/dev/null
;
then
if
[
-f
~
/.zsh-update
]
;
then
if
[
-f
${
ZSH_CACHE_DIR
}
/.zsh-update
]
;
then
.
~
/.zsh-update
.
${
ZSH_CACHE_DIR
}
/.zsh-update
if
[[
-z
"
$LAST_EPOCH
"
]]
;
then
if
[[
-z
"
$LAST_EPOCH
"
]]
;
then
_update_zsh_update
&&
return
0
;
_update_zsh_update
&&
return
0
fi
fi
epoch_diff
=
$((
$(
_current_epoch
)
-
$LAST_EPOCH
))
epoch_diff
=
$((
$(
_current_epoch
)
-
$LAST_EPOCH
))
...
@@ -42,7 +42,7 @@ if mkdir "$ZSH/log/update.lock" 2>/dev/null; then
...
@@ -42,7 +42,7 @@ if mkdir "$ZSH/log/update.lock" 2>/dev/null; then
if
[
"
$DISABLE_UPDATE_PROMPT
"
=
"true"
]
;
then
if
[
"
$DISABLE_UPDATE_PROMPT
"
=
"true"
]
;
then
_upgrade_zsh
_upgrade_zsh
else
else
echo
"[Oh My Zsh] Would you like to
check for
update
s
? [Y/n]:
\c
"
echo
"[Oh My Zsh] Would you like to update? [Y/n]:
\c
"
read
line
read
line
if
[[
"
$line
"
==
Y
*
]]
||
[[
"
$line
"
==
y
*
]]
||
[
-z
"
$line
"
]
;
then
if
[[
"
$line
"
==
Y
*
]]
||
[[
"
$line
"
==
y
*
]]
||
[
-z
"
$line
"
]
;
then
_upgrade_zsh
_upgrade_zsh
...
...
tools/install.sh
View file @
8c95c523
...
@@ -24,12 +24,10 @@ main() {
...
@@ -24,12 +24,10 @@ main() {
# which may fail on systems lacking tput or terminfo
# which may fail on systems lacking tput or terminfo
set
-e
set
-e
CHECK_ZSH_INSTALLED
=
$(
grep
/zsh
$
/etc/shells |
wc
-l
)
if
!
command
-v
zsh
>
/dev/null 2>&1
;
then
if
[
!
$CHECK_ZSH_INSTALLED
-ge
1
]
;
then
printf
"
${
YELLOW
}
Zsh is not installed!
${
NORMAL
}
Please install zsh first!
\n
"
printf
"
${
YELLOW
}
Zsh is not installed!
${
NORMAL
}
Please install zsh first!
\n
"
exit
exit
fi
fi
unset
CHECK_ZSH_INSTALLED
if
[
!
-n
"
$ZSH
"
]
;
then
if
[
!
-n
"
$ZSH
"
]
;
then
ZSH
=
~/.oh-my-zsh
ZSH
=
~/.oh-my-zsh
...
@@ -49,7 +47,7 @@ main() {
...
@@ -49,7 +47,7 @@ main() {
umask
g-w,o-w
umask
g-w,o-w
printf
"
${
BLUE
}
Cloning Oh My Zsh...
${
NORMAL
}
\n
"
printf
"
${
BLUE
}
Cloning Oh My Zsh...
${
NORMAL
}
\n
"
hash
git
>
/dev/null 2>&1
||
{
command
-v
git
>
/dev/null 2>&1
||
{
echo
"Error: git is not installed"
echo
"Error: git is not installed"
exit
1
exit
1
}
}
...
@@ -61,7 +59,7 @@ main() {
...
@@ -61,7 +59,7 @@ main() {
exit
1
exit
1
fi
fi
fi
fi
env
git clone
--depth
=
1 https://github.com/robbyrussell/oh-my-zsh.git
$ZSH
||
{
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
"
printf
"Error: git clone of oh-my-zsh repo failed
\n
"
exit
1
exit
1
}
}
...
@@ -74,9 +72,9 @@ main() {
...
@@ -74,9 +72,9 @@ main() {
fi
fi
printf
"
${
BLUE
}
Using the Oh My Zsh template file and adding it to ~/.zshrc
${
NORMAL
}
\n
"
printf
"
${
BLUE
}
Using the Oh My Zsh template file and adding it to ~/.zshrc
${
NORMAL
}
\n
"
cp
$ZSH
/templates/zshrc.zsh-template ~/.zshrc
cp
"
$ZSH
"
/templates/zshrc.zsh-template ~/.zshrc
sed
"/^export ZSH=/ c
\\
sed
"/^export ZSH=/ c
\\
export ZSH=
$ZSH
export ZSH=
\"
$ZSH
\"
"
~/.zshrc
>
~/.zshrc-omztemp
"
~/.zshrc
>
~/.zshrc-omztemp
mv
-f
~/.zshrc-omztemp ~/.zshrc
mv
-f
~/.zshrc-omztemp ~/.zshrc
...
@@ -110,7 +108,7 @@ main() {
...
@@ -110,7 +108,7 @@ main() {
echo
'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.'
echo
'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.'
echo
''
echo
''
printf
"
${
NORMAL
}
"
printf
"
${
NORMAL
}
"
env
zsh
env
zsh
-l
}
}
main
main
tools/theme_chooser.sh
View file @
8c95c523
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
# the extent permitted by applicable law. You can redistribute it
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# To Public License, Version 2, as published by Sam Hocevar. See
# http://
sam.zoy.org/wtfpl/COPYING
for more details.
# http://
www.wtfpl.net/txt/copying/
for more details.
THEMES_DIR
=
"
$ZSH
/themes"
THEMES_DIR
=
"
$ZSH
/themes"
FAVLIST
=
"
${
HOME
}
/.zsh_favlist"
FAVLIST
=
"
${
HOME
}
/.zsh_favlist"
...
...
Prev
1
…
15
16
17
18
19
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