From d4952b5f4bc5d3f4653b9961151031ee02cb9163 Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 16 Aug 2016 01:29:43 +0200 Subject: [PATCH] Swapping the commands check This commit swaps the two exports of the commands "hub" and "gh" in the aliases. The fact is the export of "gh" overwrites the previous one, and the official GitHub client is using "hub" as command. See https://github.com/github/hub/issues/475. Closes #209 --- lib/git/aliases.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git/aliases.sh b/lib/git/aliases.sh index d09db2c..a05015e 100644 --- a/lib/git/aliases.sh +++ b/lib/git/aliases.sh @@ -19,8 +19,8 @@ unset -f git > /dev/null 2>&1 # Use the full path to git to avoid infinite loop with git function export _git_cmd="$(\which git)" # Wrap git with the 'hub' github wrapper, if installed (https://github.com/defunkt/hub) -if type hub > /dev/null 2>&1; then export _git_cmd="hub"; fi if type gh > /dev/null 2>&1; then export _git_cmd="gh"; fi +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 function git(){