mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
Makes the theme plugin sane
A couple of improvements for the theme plugin * Custom themes are looked for in `$ZSH_CUSTOM/themes` * `lstheme` function doesn't cd to the directory anymore
This commit is contained in:
parent
135c3763cc
commit
53c08153df
1 changed files with 3 additions and 4 deletions
|
|
@ -8,9 +8,9 @@ function theme
|
|||
source "$RANDOM_THEME"
|
||||
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
|
||||
else
|
||||
if [ -f "$ZSH_CUSTOM/$1.zsh-theme" ]
|
||||
if [ -f "$ZSH_CUSTOM/themes/$1.zsh-theme" ]
|
||||
then
|
||||
source "$ZSH_CUSTOM/$1.zsh-theme"
|
||||
source "$ZSH_CUSTOM/themes/$1.zsh-theme"
|
||||
else
|
||||
source "$ZSH/themes/$1.zsh-theme"
|
||||
fi
|
||||
|
|
@ -19,6 +19,5 @@ function theme
|
|||
|
||||
function lstheme
|
||||
{
|
||||
cd $ZSH/themes
|
||||
ls *zsh-theme | sed 's,\.zsh-theme$,,'
|
||||
find "$ZSH"/themes "$ZSH_CUSTOM"/themes -name '*.zsh-theme' | sort -u | sed 's:.*/\(.*\)\.zsh-theme:\1:'
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue