oh-my-bash: support OMB_THEME_RANDOM_SELECTED for the selected theme name

This commit is contained in:
Koichi Murase
2022-03-25 11:51:33 +09:00
parent 209ffda0a6
commit 8451bfabd8
2 changed files with 10 additions and 2 deletions

View File

@@ -134,7 +134,10 @@ if [[ $OSH_THEME == random ]]; then
if ((${#_omb_init_files[@]})); then
_omb_init_file=${_omb_init_files[RANDOM%${#_omb_init_files[@]}]}
source "$_omb_init_file"
echo "[oh-my-bash] Random theme '$_omb_init_file' loaded..."
OMB_THEME_RANDOM_SELECTED=${_omb_init_file##*/}
OMB_THEME_RANDOM_SELECTED=${OMB_THEME_RANDOM_SELECTED%.theme.bash}
OMB_THEME_RANDOM_SELECTED=${OMB_THEME_RANDOM_SELECTED%.theme.sh}
echo "[oh-my-bash] Random theme '$OMB_THEME_RANDOM_SELECTED' ($_omb_init_file) loaded..."
fi
unset -v _omb_init_files _omb_init_file
elif [[ $OSH_THEME ]]; then