From 765bb1386aa04e39966d67b2ea2d62d04d99222a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 26 Mar 2012 11:23:35 -0400 Subject: [PATCH] only look up commands --- .bin/r | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.bin/r b/.bin/r index 0f5e8f2..68d624a 100755 --- a/.bin/r +++ b/.bin/r @@ -1,9 +1,14 @@ #!/bin/bash g() { git "$@"; } -cmd=$1 -shift -[[ -n ${cmd} ]] && acmd=$(git config --get "alias.${cmd}") +case $1 in +""|-*) ;; +*) + cmd=$1 + shift + acmd=$(git config --get "alias.${cmd}") + ;; +esac case ${acmd:-${cmd}} in rebase) -- 2.39.5