Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
2a3a940a
Commit
2a3a940a
authored
Mar 23, 2020
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
themes: change lstheme function to themes in $ZSH_CUSTOM in any level
Also sort and remove duplicates, and pipe to fmt to improve output format. Fixes #8755
parent
6fbfc4c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
themes.plugin.zsh
plugins/themes/themes.plugin.zsh
+9
-1
No files found.
plugins/themes/themes.plugin.zsh
View file @
2a3a940a
...
@@ -23,5 +23,13 @@ function lstheme {
...
@@ -23,5 +23,13 @@ function lstheme {
# Resources:
# Resources:
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Modifiers
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Modifiers
# http://zsh.sourceforge.net/Doc/Release/Expansion.html#Glob-Qualifiers
# 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
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment