Skip to content
This repository
Browse code

Merge pull request #51 from reidab/with_unalias_fix

Don't attempt to unalias blank $1 or $1 that starts with "-"
  • Loading branch information...
commit 9a8921e5a6fbf6adf2c20d34165d9269b693e40a 2 parents f9edb91 + 6dd2907
Benjamin C Meyer authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 git-achievements
6 git-achievements
@@ -135,8 +135,10 @@ function count_unlock_achievement
135 135 function unalias_command
136 136 {
137 137 #XXX maybe this should be recursive?
138   - local cmdline=$(git config --get "alias.$1")
139   - echo $cmdline
  138 + if [ -n $1 ] && [[ $1 != -* ]]; then
  139 + local cmdline=$(git config --get "alias.$1")
  140 + echo $cmdline
  141 + fi
140 142 }
141 143
142 144 function check_for_achievements

1 comment on commit 9a8921e

Ion Gonzalez

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

Please sign in to comment.
Something went wrong with that request. Please try again.