From 6dd2907a11f61acf6016064675c33c1ff7849c4a Mon Sep 17 00:00:00 2001 From: Reid Beels Date: Tue, 6 Dec 2011 15:35:46 -0800 Subject: [PATCH] Don't try to unalias when just running 'git' or when passing flags like --help --- git-achievements | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git-achievements b/git-achievements index be3c55ebd4..b1db4ab646 100755 --- a/git-achievements +++ b/git-achievements @@ -135,8 +135,10 @@ function count_unlock_achievement function unalias_command { #XXX maybe this should be recursive? - local cmdline=$(git config --get "alias.$1") - echo $cmdline + if [ -n $1 ] && [[ $1 != -* ]]; then + local cmdline=$(git config --get "alias.$1") + echo $cmdline + fi } function check_for_achievements