Fix shortcuts offset when branch_shortcuts encounters detached HEAD (fixes #127)

This commit is contained in:
David Lee
2013-12-20 00:30:52 -08:00
parent 7db526b295
commit 6860d114fc

View File

@@ -32,6 +32,7 @@ EOF
# Set numbered file shortcut in variable # Set numbered file shortcut in variable
local e=1 local e=1
IFS=$'\n'
for branch in $($_git_cmd branch "$@" | sed "s/^[* ]\{2\}//"); do for branch in $($_git_cmd branch "$@" | sed "s/^[* ]\{2\}//"); do
export $git_env_char$e="$branch" export $git_env_char$e="$branch"
if [ "${scmbDebug:-}" = "true" ]; then echo "Set \$$git_env_char$e => $file"; fi if [ "${scmbDebug:-}" = "true" ]; then echo "Set \$$git_env_char$e => $file"; fi