From d9ea2604790d0ce0f7160b77bebe06c69766c06e Mon Sep 17 00:00:00 2001 From: Aswath K Date: Mon, 8 Oct 2018 21:55:20 +0530 Subject: [PATCH] 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(-) 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) }