Also expand args for git rebase x, where x is a shortcut to a branch

This commit is contained in:
Nathan Broadbent
2012-12-15 08:49:28 +13:00
parent 42a5832916
commit aa7dd471b5

View File

@@ -24,9 +24,9 @@ if type hub > /dev/null 2>&1; then export _git_cmd="hub"; fi
# Create 'git' function that calls hub if defined, and expands all numeric arguments # Create 'git' function that calls hub if defined, and expands all numeric arguments
function git(){ function git(){
# Only expand args for a subset of git commands # Only expand args for git commands that deal with paths or branches
case $1 in case $1 in
checkout|commit|reset|rm|blame|diff|add|log) checkout|commit|reset|rm|blame|diff|add|log|rebase)
exec_scmb_expand_args "$_git_cmd" "$@";; exec_scmb_expand_args "$_git_cmd" "$@";;
branch) branch)
_scmb_git_branch_shortcuts "${@:2}";; _scmb_git_branch_shortcuts "${@:2}";;