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
0232ac4b
Unverified
Commit
0232ac4b
authored
May 08, 2019
by
Marc Cornellà
Committed by
GitHub
May 08, 2019
Browse files
Merge branch 'master' into master
parents
afb02876
ebc700be
Changes
446
Hide whitespace changes
Inline
Side-by-side
themes/xiong-chiamiov-plus.zsh-theme
View file @
0232ac4b
# user, host, full path, and time/date
# 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%}
%{\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 '
themes/xiong-chiamiov.zsh-theme
View file @
0232ac4b
# user, host, full path, and time/date
# 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%}
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]>%{\e[0m%}%b '
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
tools/check_for_upgrade.sh
View file @
0232ac4b
...
...
@@ -7,7 +7,7 @@ function _current_epoch() {
}
function
_update_zsh_update
()
{
echo
"LAST_EPOCH=
$(
_current_epoch
)
"
>!
~
/.zsh-update
echo
"LAST_EPOCH=
$(
_current_epoch
)
"
>!
${
ZSH_CACHE_DIR
}
/.zsh-update
}
function
_upgrade_zsh
()
{
...
...
@@ -30,11 +30,13 @@ fi
whence git
>
/dev/null
||
return
0
if
mkdir
"
$ZSH
/log/update.lock"
2>/dev/null
;
then
if
[
-f
~
/.zsh-update
]
;
then
.
~
/.zsh-update
if
[
-f
${
ZSH_CACHE_DIR
}
/.zsh-update
]
;
then
.
${
ZSH_CACHE_DIR
}
/.zsh-update
if
[[
-z
"
$LAST_EPOCH
"
]]
;
then
_update_zsh_update
&&
return
0
;
_update_zsh_update
rmdir
$ZSH
/log/update.lock
# TODO: fix later
return
0
fi
epoch_diff
=
$((
$(
_current_epoch
)
-
$LAST_EPOCH
))
...
...
@@ -42,7 +44,7 @@ if mkdir "$ZSH/log/update.lock" 2>/dev/null; then
if
[
"
$DISABLE_UPDATE_PROMPT
"
=
"true"
]
;
then
_upgrade_zsh
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
if
[[
"
$line
"
==
Y
*
]]
||
[[
"
$line
"
==
y
*
]]
||
[
-z
"
$line
"
]
;
then
_upgrade_zsh
...
...
tools/install.sh
View file @
0232ac4b
...
...
@@ -24,12 +24,10 @@ main() {
# which may fail on systems lacking tput or terminfo
set
-e
CHECK_ZSH_INSTALLED
=
$(
grep
/zsh
$
/etc/shells |
wc
-l
)
if
[
!
$CHECK_ZSH_INSTALLED
-ge
1
]
;
then
if
!
command
-v
zsh
>
/dev/null 2>&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
...
...
@@ -49,7 +47,7 @@ main() {
umask
g-w,o-w
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"
exit
1
}
...
...
@@ -61,7 +59,7 @@ main() {
exit
1
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
"
exit
1
}
...
...
@@ -74,14 +72,14 @@ main() {
fi
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
\\
export ZSH=
$ZSH
export ZSH=
\"
$ZSH
\"
"
~/.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
"
:
'.*/\(.*\)'
)
TEST_CURRENT_SHELL
=
$(
basename
"
$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
...
...
@@ -105,12 +103,12 @@ main() {
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
'p.s. Follow us at https://twitter.com/ohmyzsh'
echo
''
echo
'p.p.s. Get stickers
and t-shirt
s at https://shop.planetargon.com
.
'
echo
'p.p.s. Get stickers
, shirts, and coffee mug
s at https://shop.planetargon.com
/collections/oh-my-zsh
'
echo
''
printf
"
${
NORMAL
}
"
env
zsh
env
zsh
-l
}
main
tools/theme_chooser.sh
View file @
0232ac4b
...
...
@@ -5,7 +5,7 @@
# 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
# 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"
FAVLIST
=
"
${
HOME
}
/.zsh_favlist"
...
...
tools/upgrade.sh
View file @
0232ac4b
...
...
@@ -33,7 +33,7 @@ then
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: https://shop.planetargon.com/"
printf
"
${
BLUE
}${
BOLD
}
%s
${
NORMAL
}
\n
"
"Get your Oh My Zsh swag at: https://shop.planetargon.com/
collections/oh-my-zsh
"
else
printf
"
${
RED
}
%s
${
NORMAL
}
\n
"
'There was an error updating. Try again later?'
fi
Prev
1
…
19
20
21
22
23
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