1
0
mirror of https://github.com/Mayccoll/Gogh.git synced 2023-08-10 21:12:46 +03:00

Fix substring expression < 0

This commit is contained in:
mquintero 2017-08-31 09:35:37 -05:00
parent 828f448f6f
commit 6e431902c3

View File

@ -193,7 +193,7 @@ Themes:
for TH in "${THEMES[@]}"; do for TH in "${THEMES[@]}"; do
KEY=$(printf "%02d" $NUM) KEY=$(printf "%02d" $NUM)
FILENAME=${TH::-3} FILENAME=${TH::$((${#TH}-3))}
FILENAME_SPACE=${FILENAME//-/ } FILENAME_SPACE=${FILENAME//-/ }
echo -e " (\\e[0m\e[0;34m $KEY \\e[0m\e[0m) ${FILENAME_SPACE^}" echo -e " (\\e[0m\e[0;34m $KEY \\e[0m\e[0m) ${FILENAME_SPACE^}"
@ -215,7 +215,7 @@ read -p 'Enter OPTION(S) : ' -a OPTION
# | # |
for OP in "${OPTION[@]}"; do for OP in "${OPTION[@]}"; do
if (( OP <= ARRAYLENGTH )); then if [[ OP -le ARRAYLENGTH ]]; then
FILENAME="${THEMES[((OP-1))]::-3}" FILENAME="${THEMES[((OP-1))]::-3}"
FILENAME_SPACE="${FILENAME//-/ }" FILENAME_SPACE="${FILENAME//-/ }"
echo "Theme: ${FILENAME_SPACE^}" echo "Theme: ${FILENAME_SPACE^}"