Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

bugfix for #33. don't add a trailing space when creating aliases #40

Merged
merged 1 commit into from

3 participants

@flipkick

this commit only adds the space if there are additional arguments

@ndbroadbent ndbroadbent merged commit 55950ad into ndbroadbent:master
@ndbroadbent
Owner

Thanks for this, sorry I haven't been active on this project for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 22, 2012
  1. @flipkick

    fixes #33, don't define the aliases with a trailing space when there …

    flipkick authored
    …is no following argument
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/git/aliases_and_bindings.sh
View
4 lib/git/aliases_and_bindings.sh
@@ -38,8 +38,8 @@ _git
# Usage: __git_alias <alias> <command_prefix> <command>
__git_alias () {
if [ -n "$1" ]; then
- local alias_str="$1"; local cmd_prefix="$2"; local cmd="$3"; local cmd_args=" ${4-}"
- alias $alias_str="$cmd_prefix $cmd$cmd_args"
+ local alias_str="$1"; local cmd_prefix="$2"; local cmd="$3"; local cmd_args="${4-}"
+ alias $alias_str="$cmd_prefix $cmd${cmd_args:+ }$cmd_args"
if [ "$shell" = "bash" ]; then
__define_git_completion $alias_str $cmd
complete -o default -o nospace -F _git_"$alias_str"_shortcut $alias_str
Something went wrong with that request. Please try again.