-
-
Notifications
You must be signed in to change notification settings - Fork 757
Implement omb theme
#620
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
base: master
Are you sure you want to change the base?
Implement omb theme
#620
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,43 @@ function _omb_cmd_reload { | |
| echo 'Not yet implemented' | ||
| } | ||
| function _omb_cmd_theme { | ||
| echo 'Not yet implemented' | ||
| case "$1" in | ||
| list) | ||
| local -a available_themes | ||
| _comp_cmd_omb__get_available_themes | ||
| for theme in "${available_themes[@]}"; do | ||
| echo "$theme" | ||
| done | ||
RobLoach marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ;; | ||
| use) | ||
| local theme=$2 | ||
RobLoach marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if [[ -z "$theme" ]]; then | ||
| echo 'Usage: omb theme use <theme>' | ||
RobLoach marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return 2 | ||
| fi | ||
| local -a available_themes | ||
| _comp_cmd_omb__get_available_themes | ||
| for i in "${available_themes[@]}"; do | ||
| if [ "$i" == "$theme" ]; then | ||
| _omb_module_require_theme "$theme" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
To handle this, we may need to factorize a part of |
||
| return 0 | ||
| fi | ||
| done | ||
| echo "Theme '$theme' not found" | ||
RobLoach marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ;; | ||
| set) | ||
| echo 'Not yet implemented' | ||
| ;; | ||
| *) | ||
| echo 'Usage: omb theme <command>' | ||
| echo '' | ||
| echo 'Available commands:' | ||
| echo ' list List all available themes' | ||
| echo ' set <theme> Set the given theme in your .bashrc file' | ||
| echo ' use <theme> Load the given theme' | ||
RobLoach marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return 2 | ||
| ;; | ||
| esac | ||
| } | ||
| function _omb_cmd_update { | ||
| echo 'Not yet implemented' | ||
|
|
@@ -161,7 +197,7 @@ function _comp_cmd_omb { | |
| theme) | ||
| local -a subcmds=( | ||
| 'list:List themes' | ||
| 'set:Set a theme in your .zshrc file' | ||
| 'set:Set a theme in your .bashrc file' | ||
| 'use:Load a theme' | ||
| ) | ||
| _comp_cmd_omb__describe 'command' subcmds ;; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.