Merge pull request #224 from MattWis/master

Add ability to preview themes
pull/394/head
Nils Winkler 2015-01-07 08:26:11 +01:00
commit 730e2fd101
2 changed files with 20 additions and 0 deletions

View File

@ -44,6 +44,8 @@ There are a few bash it themes. If you've created your own custom prompts, I'd
You can see the theme screenshots [here](https://github.com/revans/bash-it/wiki/Themes) You can see the theme screenshots [here](https://github.com/revans/bash-it/wiki/Themes)
Alternatively, you can preview the themes in your own shell using `BASH_PREVIEW=true reload`
## Misc ## Misc
### Bash Profile Aliases ### Bash Profile Aliases

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=$(basename -s '.theme.bash' $theme)
echo "
$BASH_IT_THEME"
echo "" | bash --init-file $BASH_IT/bash_it.sh -i
done
fi