lib/preview: `shfmt` && `shellcheck`
Fix theme file path globbing when $BASH_IT contains any spaces. My apologies to future `git blame` hunters ♥pull/1904/head
parent
1506f9a6c9
commit
6684422ff7
|
|
@ -80,6 +80,7 @@ completion/available/wpscan.completion.bash
|
||||||
# libraries
|
# libraries
|
||||||
lib/helpers.bash
|
lib/helpers.bash
|
||||||
lib/log.bash
|
lib/log.bash
|
||||||
|
lib/preview.bash
|
||||||
lib/search.bash
|
lib/search.bash
|
||||||
lib/utilities.bash
|
lib/utilities.bash
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
if [[ "${BASH_PREVIEW:-}" ]];
|
# shellcheck shell=bash
|
||||||
then
|
#
|
||||||
|
# Displays the prompt from each _Bash It_ theme.
|
||||||
|
|
||||||
|
if [[ -n "${BASH_PREVIEW:-}" ]]; then
|
||||||
unset BASH_PREVIEW #Prevent infinite looping
|
unset BASH_PREVIEW #Prevent infinite looping
|
||||||
echo "
|
echo "
|
||||||
|
|
||||||
|
|
@ -7,13 +10,11 @@ then
|
||||||
|
|
||||||
"
|
"
|
||||||
|
|
||||||
THEMES="$BASH_IT/themes/*/*.theme.bash"
|
for theme in "${BASH_IT?}/themes"/*/*.theme.bash; do
|
||||||
for theme in $THEMES
|
|
||||||
do
|
|
||||||
BASH_IT_THEME=${theme%.theme.bash}
|
BASH_IT_THEME=${theme%.theme.bash}
|
||||||
BASH_IT_THEME=${BASH_IT_THEME##*/}
|
BASH_IT_THEME=${BASH_IT_THEME##*/}
|
||||||
echo "
|
echo "
|
||||||
$BASH_IT_THEME"
|
$BASH_IT_THEME"
|
||||||
echo "" | bash --init-file "${BASH_IT}/bash_it.sh" -i
|
echo "" | bash --init-file "${BASH_IT?}/bash_it.sh" -i
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue