-
-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement omb theme
#620
base: master
Are you sure you want to change the base?
Implement omb theme
#620
Conversation
Thank you for the PR! I have a question. How is the upstream OMZ Since this is related to the OMB specific feature for themes, I feel this should be implemented as a subcommand of the edit: If we switch to Lines 20 to 22 in e712342
|
Namespacing it within |
Available commands: list List all available themes set <theme> Set the given theme in your .bashrc file use <theme> Load the given theme
Not sure how I feel about manipulating the |
_comp_cmd_omb__get_available_themes | ||
for i in "${available_themes[@]}"; do | ||
if [ "$i" == "$theme" ]; then | ||
_omb_module_require_theme "$theme" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_omb_module_require_theme
is kind of "include once"; it checks whether the module is already loaded and loads the module only when it hasn't been loaded. So, with this implementation, one cannot switch to the theme that was loaded before.
To handle this, we may need to factorize a part of _omb_module_require
(oh-my-bash.sh
) into _omb_module_search
and use it to obtain the location of the theme file.
Co-authored-by: Koichi Murase <[email protected]>
Co-authored-by: Koichi Murase <[email protected]>
This introduces a
themes
plugin which allows changing the theme on the fly. This mimics the themes oh-my-zsh plugin.Usage
theme <theme_name>
- Changes the theme to specified theme.theme
- Changes the theme to some random theme.lstheme
- Lists installed themes.