-
Notifications
You must be signed in to change notification settings - Fork 5
/
enabled.sh
executable file
·42 lines (37 loc) · 998 Bytes
/
enabled.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
# Determine what is currently installed.
TC_DIR=`pwd`
if [ -f ${TC_DIR}/bash/colors/colors.bash ]; then
source ${TC_DIR}/bash/colors/colors.bash
fi
if [ -d $HOME/.bash/ ]; then
echo
echo -e "${echo_bold_purple} What's Installed?${echo_reset_color}"
echo
# Determines what scripts are available for useage.
for directory in "aliases" "plugins" "completions"
do
echo -e "${echo_bold_cyan} $( echo ${directory} | tr [a-z] [A-Z]) ${echo_reset_color}"
echo
for file in `ls $HOME/.bash/${directory}/*`
do
case ${directory} in
"themes")
filename=$(echo ${file##*/})
case $filename in
*theme*)
echo " $(echo ${filename%.*})"
;;
esac
;;
*)
filename=$(echo ${file##*/})
echo " $(echo ${filename%.*})"
;;
esac
done
echo
done
else
echo -e "Nothing is installed or TC_COMPILE was used."
fi