From 5762652b2544aa48a53929113af96f7664a4a424 Mon Sep 17 00:00:00 2001 From: Brent Redd Date: Mon, 27 Apr 2015 17:25:56 -0600 Subject: [PATCH] use double quotes to handle path with spaces --- gitprompt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitprompt.sh b/gitprompt.sh index 3b07956..9c56dec 100755 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -52,7 +52,7 @@ function get_theme() local theme="" # use default theme, if theme was not found - for themefile in `ls $__GIT_PROMPT_DIR/themes`; do + for themefile in `ls "$__GIT_PROMPT_DIR/themes"`; do if [[ "${themefile}" = "${GIT_PROMPT_THEME}.bgptheme" ]]; then theme=$GIT_PROMPT_THEME fi @@ -83,7 +83,7 @@ function git_prompt_list_themes() git_prompt_dir get_theme - for themefile in `ls $__GIT_PROMPT_DIR/themes`; do + for themefile in `ls "$__GIT_PROMPT_DIR/themes"`; do local theme="$(basename $themefile .bgptheme)" if [[ "${GIT_PROMPT_THEME}" = "${theme}" ]]; then