Use $_git_cmd internally

This commit is contained in:
Nathan Broadbent
2012-08-16 02:39:58 +12:00
parent af84c992b7
commit ef91007da9

View File

@@ -14,7 +14,7 @@ unalias $git_branch_alias > /dev/null 2>&1; unset -f $git_branch_alias > /dev/nu
function _scmb_git_branch_shortcuts {
# Use ruby to inject numbers into ls output
ruby -e "$( cat <<EOF
output = %x(script -q -c "git branch --color=always \"$@\"" /dev/null)
output = %x(script -q -c "$_git_cmd branch --color=always \"$@\"" /dev/null)
line_count = output.lines.to_a.size
output.lines.each_with_index do |line, i|
spaces = (line_count > 9 && i < 9 ? " " : " ")
@@ -25,7 +25,7 @@ EOF
# Set numbered file shortcut in variable
local e=1
for branch in $(git branch "$@" | sed "s/^[* ]\{2\}//"); do
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
let e++