Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
3c209b00
Unverified
Commit
3c209b00
authored
Sep 30, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cli): show current theme in `omz theme list`
Fixes #9540
parent
72b8f0b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
cli.zsh
lib/cli.zsh
+16
-6
No files found.
lib/cli.zsh
View file @
3c209b00
...
@@ -630,17 +630,23 @@ function _omz::theme::list {
...
@@ -630,17 +630,23 @@ function _omz::theme::list {
return
return
fi
fi
# Print theme in use
if
[[
-n
"
$ZSH_THEME
"
]]
;
then
print
-Pn
"%U%BCurrent theme%b%u: "
[[
$ZSH_THEME
=
random
]]
&&
echo
"
$RANDOM_THEME
(via random)"
||
echo
"
$ZSH_THEME
"
echo
fi
# Print custom themes if there are any
if
((
${#
custom_themes
}
))
;
then
if
((
${#
custom_themes
}
))
;
then
print
-P
"%U%BCustom themes%b%u:"
print
-P
"%U%BCustom themes%b%u:"
print
-l
${
(q-)custom_themes
}
| column
-x
print
-l
${
(q-)custom_themes
}
| column
-x
echo
fi
fi
if
((
${#
builtin_themes
}
))
;
then
# Print built-in themes
((
${#
custom_themes
}
))
&&
echo
# add a line of separation
print
-P
"%U%BBuilt-in themes%b%u:"
print
-l
${
(q-)builtin_themes
}
| column
-x
print
-P
"%U%BBuilt-in themes%b%u:"
print
-l
${
(q-)builtin_themes
}
| column
-x
fi
}
}
function
_omz::theme::set
{
function
_omz::theme::set
{
...
@@ -727,6 +733,10 @@ function _omz::theme::use {
...
@@ -727,6 +733,10 @@ function _omz::theme::use {
_omz::log error
"%B
$1
%b theme not found"
_omz::log error
"%B
$1
%b theme not found"
return
1
return
1
fi
fi
# Update theme settings
ZSH_THEME
=
"
$1
"
[[
$1
=
random
]]
||
unset
RANDOM_THEME
}
}
function
_omz::update
{
function
_omz::update
{
...
...
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