From 0784e99eefef74110f759895c806ad2c400d1244 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Fri, 23 Dec 2011 11:51:08 +0800 Subject: [PATCH] When $arg is a normal string, treat it as shell-quoted. But still treat expanded args as plain strings, otherwise it breaks for filenames with spaces --- lib/git/status_shortcuts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git/status_shortcuts.sh b/lib/git/status_shortcuts.sh index d1df903..fed3b35 100644 --- a/lib/git/status_shortcuts.sh +++ b/lib/git/status_shortcuts.sh @@ -166,7 +166,7 @@ git_expand_args() { else echo -n " " fi - printf '%s' "$arg" + printf '%q' "$arg" fi done }