diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2020-04-24 20:54:33 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2020-04-24 20:54:33 -0600 |
commit | c197ad40f1dca62fd1e0e555e7bfc84e39f31223 (patch) | |
tree | 5c1e753e0ff2cb9d0e08a699f17352225b9ef9f1 /plugins/themes/themes.plugin.zsh | |
parent | 0b67340fd2fe9330d8487491e1983ad1a111fb2b (diff) | |
parent | 2560f04982dfc2693221c7c0f47d1a71df09a794 (diff) | |
download | zsh-c197ad40f1dca62fd1e0e555e7bfc84e39f31223.tar.gz zsh-c197ad40f1dca62fd1e0e555e7bfc84e39f31223.tar.bz2 zsh-c197ad40f1dca62fd1e0e555e7bfc84e39f31223.zip |
Merge branch 'master' of https://github.com/ohmyzsh/ohmyzsh
Diffstat (limited to 'plugins/themes/themes.plugin.zsh')
-rw-r--r-- | plugins/themes/themes.plugin.zsh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/themes/themes.plugin.zsh b/plugins/themes/themes.plugin.zsh index 1fbde5b64..650856284 100644 --- a/plugins/themes/themes.plugin.zsh +++ b/plugins/themes/themes.plugin.zsh @@ -23,5 +23,13 @@ function lstheme { # Resources: # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Modifiers # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Glob-Qualifiers - print "$ZSH_CUSTOM"/*.zsh-theme(N:t:r) {"$ZSH_CUSTOM","$ZSH"}/themes/*.zsh-theme(N:t:r) + { + # Show themes inside $ZSH_CUSTOM (in any subfolder) + # Strip $ZSH_CUSTOM/themes/ and $ZSH_CUSTOM/ from the name, so that it matches + # the value that should be written in $ZSH_THEME to load the theme. + print -l "$ZSH_CUSTOM"/**/*.zsh-theme(.N:r:gs:"$ZSH_CUSTOM"/themes/:::gs:"$ZSH_CUSTOM"/:::) + + # Show themes inside $ZSH, stripping the head of the path. + print -l "$ZSH"/themes/*.zsh-theme(.N:t:r) + } | sort -u | fmt -w $COLUMNS } |