-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add support to create aliases for base24 themes #56
base: main
Are you sure you want to change the base?
Conversation
1d22ec5
to
cecb734
Compare
@@ -110,10 +111,6 @@ set_theme() | |||
done | |||
unset hook | |||
fi | |||
|
|||
unset theme_name |
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.
these variables are already local to the function
@@ -58,7 +58,8 @@ set_theme() | |||
{ | |||
local theme_name="$1" | |||
local force_load="$2" | |||
local script_path="$BASE16_SHELL_PATH/scripts/base16-$theme_name.sh" | |||
local n="${3-16}" |
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.
the least disruptive option I could think of was to just add another argument. Alternatively the n
could have been part of the theme name, but that would potentially break existing usage of set_theme
since the theme name argument is stripped of the base{n}-
prefix
theme_name=${script_name#"base${n}-"} # eg: solarized-light | ||
function_name="base${n}_${theme_name}" | ||
|
||
alias ${function_name}="set_theme ${theme_name} '' ${n}" |
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.
the second argument is an empty string to not affect the force
argument of set_theme
No description provided.