diff --git a/profile_helper.sh b/profile_helper.sh index 7db5520..321cd99 100755 --- a/profile_helper.sh +++ b/profile_helper.sh @@ -126,17 +126,19 @@ alias reset="command reset \ && . $BASE16_SHELL_COLORSCHEME_PATH" # Set base16_* aliases -for script_path in "$BASE16_SHELL_PATH"/scripts/base16*.sh; do - script_name=${script_path##*/} - script_name=${script_name%.sh} - theme_name=${script_name#base16-} # eg: solarized-light - function_name="base16_${theme_name}" - - alias $function_name="set_theme \"${theme_name}\"" +for n in 16 24; do + for script_path in "${BASE16_SHELL_PATH}/scripts/base${n}-"*.sh; do + script_name=${script_path##*/} + script_name=${script_name%.sh} + theme_name=${script_name#"base${n}-"} # eg: solarized-light + function_name="base${n}_${theme_name}" + + alias ${function_name}="set_theme ${theme_name}" + done; done; # unset loop variables to not leak to user's shell -unset script_path script_name theme_name function_name +unset n script_path script_name theme_name function_name # If $BASE16_THEME is set, this has already been loaded. This guards # against a bug where this script is sourced two or more times.