]> git.wh0rd.org Git - home.git/commitdiff
only look up commands
authorMike Frysinger <vapier@gentoo.org>
Mon, 26 Mar 2012 15:23:35 +0000 (11:23 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:45 +0000 (15:36 -0400)
.bin/r

diff --git a/.bin/r b/.bin/r
index 0f5e8f24bb2cde2b2a25efaf7bfb5449a467c431..68d624a7316c7f01b6059781d8cbdfc93c06fb7f 100755 (executable)
--- 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)