Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Dec 7, 2011
Jump to file or symbol
Failed to load files and symbols.
+4 −2
Split
View
@@ -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