Add ability to preview themes

pull/224/head
MattWis 2013-08-04 01:01:14 -04:00 committed by Matt Wismer
parent 011e9767d6
commit a9e8f10e35
1 changed files with 18 additions and 0 deletions

18
lib/preview.bash 100644
View File

@ -0,0 +1,18 @@
if [[ $BASH_PREVIEW ]];
then
unset BASH_PREVIEW #Prevent infinite looping
echo "
Previewing Bash-it Themes
"
THEMES="$BASH_IT/themes/*/*.theme.bash"
for theme in $THEMES
do
BASH_IT_THEME=$(echo $theme | sed "s/\//\n/g" | tail -1 | sed "s/.theme.bash//")
echo "
$BASH_IT_THEME"
echo "" | bash --init-file $BASH_IT/bash_it.sh -i
done
fi