From 23bb556249a301bd04357de700708350dcf2532a Mon Sep 17 00:00:00 2001 From: Arvindraj Date: Mon, 14 Aug 2017 20:40:28 +0530 Subject: [PATCH] Show the selected theme name ... Instead of using the previous value of `FILENAME_SPACE' - Which would be the name of the last theme in the list * Variables inside '(( ))' don't require $ for expanding Signed-off-by: Arvindraj --- gogh.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gogh.sh b/gogh.sh index 4eec9e9..d6689b6 100644 --- a/gogh.sh +++ b/gogh.sh @@ -216,8 +216,10 @@ read -p 'Enter OPTION(S) : ' -a OPTION for OP in "${OPTION[@]}"; do if (( OP < ARRAYLENGTH )); then + FILENAME="${THEMES[((OP-1))]::-3}" + FILENAME_SPACE="${FILENAME//-/ }" echo "Theme: ${FILENAME_SPACE^}" - SET_THEME="${THEMES[(($OP-1))]}" + SET_THEME="${THEMES[((OP-1))]}" set_gogh "${SET_THEME}" exit 1 else