From 08f2fc12143175d011d69189679b0ed4c834b5c7 Mon Sep 17 00:00:00 2001 From: Aswath K Date: Fri, 5 Oct 2018 13:43:39 +0530 Subject: themes: fix custom themes directory (#7233) --- plugins/themes/themes.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/themes/themes.plugin.zsh') diff --git a/plugins/themes/themes.plugin.zsh b/plugins/themes/themes.plugin.zsh index 7519b0253..487e85689 100644 --- a/plugins/themes/themes.plugin.zsh +++ b/plugins/themes/themes.plugin.zsh @@ -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 -- cgit v1.2.3-70-g09d2 From d9ea2604790d0ce0f7160b77bebe06c69766c06e Mon Sep 17 00:00:00 2001 From: Aswath K Date: Mon, 8 Oct 2018 21:55:20 +0530 Subject: themes: add custom themes directory support to `lstheme` (#7236) `lstheme` command used to list only the themes listed in `$ZSH/themes/` directory. This commit adds themes in `$ZSH_CUSTOM/themes/` also to the theme listings. --- plugins/themes/themes.plugin.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/themes/themes.plugin.zsh') diff --git a/plugins/themes/themes.plugin.zsh b/plugins/themes/themes.plugin.zsh index 487e85689..2cd0ee327 100644 --- a/plugins/themes/themes.plugin.zsh +++ b/plugins/themes/themes.plugin.zsh @@ -19,6 +19,8 @@ function theme function lstheme { - cd $ZSH/themes - ls *zsh-theme | sed 's,\.zsh-theme$,,' + # Resources: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Modifiers + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Glob-Qualifiers + print -l {$ZSH,$ZSH_CUSTOM}/themes/*.zsh-theme(N:t:r) } -- cgit v1.2.3-70-g09d2