defunkt/hub — pull request #222 by ypresto (2012-07-23 17:40:37+00:00)
Title: Fix syntax error on `eval $(hub alias -s)'

According to README.md, aliasing from git to hub is done by eval.
Currently, hub outputs alias script like below:

$ hub alias -s
alias git=hub
if type compdef >/dev/null; then
compdef hub=git
fi

With $(cmd) or `cmd`, this will be broken by concatenation.

$ echo $(hub alias -s)
alias git=hub if type compdef >/dev/null; then compdef hub=git fi

To solve this, added semicolons on each end of lines:

$ echo $(hub alias -s)
alias git=hub; if type compdef >/dev/null; then compdef hub=git fi

(not added after 'then' because it would be syntax error on bash)

This solution also used by ssh-agent.