summaryrefslogtreecommitdiff
path: root/plugins/themes/themes.plugin.zsh
diff options
context:
space:
mode:
authorAswath K <aswath.sana@gmail.com>2018-10-08 21:55:20 +0530
committerMarc Cornellà <marc.cornella@live.com>2018-10-08 18:25:20 +0200
commitd9ea2604790d0ce0f7160b77bebe06c69766c06e (patch)
treed6b5c1661206101a83487a0bed0b7f15317be03b /plugins/themes/themes.plugin.zsh
parent999d3ddf4cb4f263e9ea27b7ca0b5617c4ed19cb (diff)
downloadzsh-d9ea2604790d0ce0f7160b77bebe06c69766c06e.tar.gz
zsh-d9ea2604790d0ce0f7160b77bebe06c69766c06e.tar.bz2
zsh-d9ea2604790d0ce0f7160b77bebe06c69766c06e.zip
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.
Diffstat (limited to 'plugins/themes/themes.plugin.zsh')
-rw-r--r--plugins/themes/themes.plugin.zsh6
1 files 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)
}