Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
5e77e00a
Commit
5e77e00a
authored
Dec 01, 2015
by
LE Manh Cuong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some improvements
- Adding documentation - Note the effect empty array - Fix spelling - Using new test `[[...]]`
parent
531c41cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
README.markdown
README.markdown
+8
-0
oh-my-zsh.sh
oh-my-zsh.sh
+3
-3
zshrc.zsh-template
templates/zshrc.zsh-template
+2
-1
No files found.
README.markdown
View file @
5e77e00a
...
...
@@ -88,6 +88,14 @@ If you're feeling feisty, you can let the computer select one randomly for you e
ZSH_THEME="random" # (...please let it be pie... please be some pie..)
```
And if you want to pick random theme from a list of your favorite themes:
```
shell
ZSH_THEM_RANDOM_CANDIDATES
=(
"robbyrussell"
"agnoster"
)
```
## Advanced Topics
...
...
oh-my-zsh.sh
View file @
5e77e00a
...
...
@@ -93,9 +93,9 @@ done
unset
config_file
# Load the theme
if
[
"
$ZSH_THEME
"
=
"random"
]
;
then
if
[
"
${
(t)ZSH_THEME_RANDOM_CANDICATES
}
"
=
"array"
]
&&
[
"
${#
ZSH_THEME_RANDOM_CANDICATES
[@]
}
"
-gt
0
]
;
then
themes
=(
$ZSH
/themes/
${
^ZSH_THEME_RANDOM_CANDI
C
ATES
}
.zsh-theme
)
if
[
[
"
$ZSH_THEME
"
==
"random"
]
]
;
then
if
[
[
"
${
(t)ZSH_THEME_RANDOM_CANDIDATES
}
"
=
"array"
]]
&&
[[
"
${#
ZSH_THEME_RANDOM_CANDIDATES
[@]
}
"
-gt
0
]
]
;
then
themes
=(
$ZSH
/themes/
${
^ZSH_THEME_RANDOM_CANDI
D
ATES
}
.zsh-theme
)
else
themes
=(
$ZSH
/themes/
*
zsh-theme
)
fi
...
...
templates/zshrc.zsh-template
View file @
5e77e00a
...
...
@@ -11,7 +11,8 @@ ZSH_THEME="robbyrussell"
# Setting this variable when ZSH_THEME=random
# cause zsh load theme from this variable instead of
# looking in ~/.oh-my-zsh/themes/
# ZSH_THEME_RANDOM_CANDICATES=()
# An empty array have no effect
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
...
...
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