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:
Joe H. Rahme 2015-11-12 15:18:38 +01:00
commit 53c08153df

View file

@ -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:'
}