From: Mike Frysinger Date: Mon, 26 Mar 2012 15:23:35 +0000 (-0400) Subject: only look up commands X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=765bb1386aa04e39966d67b2ea2d62d04d99222a;p=home.git only look up commands --- 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)