From f1940dfe8bf7afea862e7d69f082022a975b1dfa Mon Sep 17 00:00:00 2001 From: oGre Date: Mon, 28 Sep 2015 22:14:48 +0200 Subject: [PATCH] Quoted paths to handle spaces in them --- gitprompt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitprompt.sh b/gitprompt.sh index b106db9..00a79c2 100755 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -49,7 +49,7 @@ function get_theme() { local theme="" # use default theme, if theme was not found - for themefile in ${__GIT_PROMPT_DIR}/themes/*.bgptheme; do + for themefile in "${__GIT_PROMPT_DIR}/themes/"*.bgptheme; do local basename=${themefile##*/} if [[ "${basename%.bgptheme}" = "${GIT_PROMPT_THEME}" ]]; then theme=$GIT_PROMPT_THEME @@ -80,7 +80,7 @@ function git_prompt_list_themes() { git_prompt_dir get_theme - for themefile in ${__GIT_PROMPT_DIR}/themes/*.bgptheme; do + for themefile in "${__GIT_PROMPT_DIR}/themes/"*.bgptheme; do local basename=${themefile##*/} local theme="${basename%.bgptheme}" if [[ "${GIT_PROMPT_THEME}" = "${theme}" ]]; then