From 6860d114fc481baf25cc66377ade432154c571a3 Mon Sep 17 00:00:00 2001 From: David Lee Date: Fri, 20 Dec 2013 00:30:52 -0800 Subject: [PATCH] Fix shortcuts offset when branch_shortcuts encounters detached HEAD (fixes #127) --- lib/git/branch_shortcuts.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/git/branch_shortcuts.sh b/lib/git/branch_shortcuts.sh index 1e933b9..9a7e94a 100644 --- a/lib/git/branch_shortcuts.sh +++ b/lib/git/branch_shortcuts.sh @@ -32,6 +32,7 @@ EOF # Set numbered file shortcut in variable local e=1 + IFS=$'\n' for branch in $($_git_cmd branch "$@" | sed "s/^[* ]\{2\}//"); do export $git_env_char$e="$branch" if [ "${scmbDebug:-}" = "true" ]; then echo "Set \$$git_env_char$e => $file"; fi