Browse files

Merge pull request #51 from reidab/with_unalias_fix

Don't attempt to unalias blank $1 or $1 that starts with "-"
  • Loading branch information...
2 parents f9edb91 + 6dd2907 commit 9a8921e5a6fbf6adf2c20d34165d9269b693e40a @icefox committed Dec 7, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 git-achievements
View
6 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

1 comment on commit 9a8921e

@suzzlo

Don't attempt to unalias blank $1 or $1 that starts with "-"

Please sign in to comment.