Merge pull request #224 from MattWis/master
Add ability to preview themes
This commit is contained in:
@@ -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)
|
||||
|
||||
Alternatively, you can preview the themes in your own shell using `BASH_PREVIEW=true reload`
|
||||
|
||||
## Misc
|
||||
|
||||
### Bash Profile Aliases
|
||||
|
||||
18
lib/preview.bash
Normal file
18
lib/preview.bash
Normal 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
|
||||
Reference in New Issue
Block a user