mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-21 23:33:21 +01:00
Some improvements
- Adding documentation - Note the effect empty array - Fix spelling - Using new test `[[...]]`
This commit is contained in:
parent
531c41cdfe
commit
5e77e00ad5
@ -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..)
|
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
|
## Advanced Topics
|
||||||
|
|
||||||
|
@ -93,9 +93,9 @@ done
|
|||||||
unset config_file
|
unset config_file
|
||||||
|
|
||||||
# Load the theme
|
# Load the theme
|
||||||
if [ "$ZSH_THEME" = "random" ]; then
|
if [[ "$ZSH_THEME" == "random" ]]; then
|
||||||
if [ "${(t)ZSH_THEME_RANDOM_CANDICATES}" = "array" ] && [ "${#ZSH_THEME_RANDOM_CANDICATES[@]}" -gt 0 ]; then
|
if [[ "${(t)ZSH_THEME_RANDOM_CANDIDATES}" = "array" ]] && [[ "${#ZSH_THEME_RANDOM_CANDIDATES[@]}" -gt 0 ]]; then
|
||||||
themes=($ZSH/themes/${^ZSH_THEME_RANDOM_CANDICATES}.zsh-theme)
|
themes=($ZSH/themes/${^ZSH_THEME_RANDOM_CANDIDATES}.zsh-theme)
|
||||||
else
|
else
|
||||||
themes=($ZSH/themes/*zsh-theme)
|
themes=($ZSH/themes/*zsh-theme)
|
||||||
fi
|
fi
|
||||||
|
@ -11,7 +11,8 @@ ZSH_THEME="robbyrussell"
|
|||||||
# Setting this variable when ZSH_THEME=random
|
# Setting this variable when ZSH_THEME=random
|
||||||
# cause zsh load theme from this variable instead of
|
# cause zsh load theme from this variable instead of
|
||||||
# looking in ~/.oh-my-zsh/themes/
|
# 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.
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
# CASE_SENSITIVE="true"
|
# CASE_SENSITIVE="true"
|
||||||
|
Loading…
Reference in New Issue
Block a user