From 526fb778233e4aaac0ffd4c1afc701d73eaafb52 Mon Sep 17 00:00:00 2001 From: Nicolai Skogheim Date: Wed, 29 Jul 2015 05:10:22 +0200 Subject: [PATCH] Quote variables bc of filenames with spaces --- bin/git-effort | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/git-effort b/bin/git-effort index 278689b..9b451f4 100755 --- a/bin/git-effort +++ b/bin/git-effort @@ -8,7 +8,7 @@ color= # get dates for the given # dates() { - eval "git log --pretty='format: %ad' --date=short $args_to_git_log "$1"" + eval "git log --pretty='format: %ad' --date=short $args_to_git_log \"$1\"" } # @@ -60,7 +60,7 @@ color_for() { effort() { file=$1 local commit_dates - commit_dates=`dates $file` + commit_dates=`dates "$file"` [ $? -gt 0 ] && exit 255 # Ensure it's not just an empty line @@ -85,7 +85,7 @@ effort() { i=$(($i+1)) done - msg=$(printf " \033[${color}m%s %-10d" $f_dot $commits) + msg=$(printf " \033[${color}m%s %-10d" "$f_dot" $commits) # active days active=`active_days "$commit_dates"`