d9ea2604790d0ce0f7160b77bebe06c69766c06e

Author
Aswath K <aswath.sana@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

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.

Diff

 1diff --git a/plugins/themes/themes.plugin.zsh b/plugins/themes/themes.plugin.zsh
 2index 487e85689351c6f055fb842fb100f0176a786375..2cd0ee3277006e079bd4c20dc09419976f6150a4 100644
 3--- a/plugins/themes/themes.plugin.zsh
 4+++ b/plugins/themes/themes.plugin.zsh
 5@@ -19,6 +19,8 @@ function theme
 6 
 7 function lstheme
 8 {
 9-    cd $ZSH/themes
10-    ls *zsh-theme | sed 's,\.zsh-theme$,,'
11+    # Resources:
12+    # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Modifiers
13+    # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Glob-Qualifiers
14+    print -l {$ZSH,$ZSH_CUSTOM}/themes/*.zsh-theme(N:t:r)
15 }