diff --git a/bash/bashrc/sources/40_go-command b/bash/bashrc/sources/40_go-command index 9137dc9..6c2ec67 100755 --- a/bash/bashrc/sources/40_go-command +++ b/bash/bashrc/sources/40_go-command @@ -60,9 +60,8 @@ function go() { for ((i = 0; i < ${#LOCS[@]}; i++)) do LOC=${LOCS[i]} - LOCATION=$(ls -d "$UDEV/$SITE/$LOC/*$ARG3*/" 2> /dev/null ) + LOCATION=$(ls -d "$UDEV/$SITE/$LOC/"*"$ARG3"*/ 2> /dev/null ) if [[ -n "$LOCATION" ]]; then - LOCATION="$LOC/$LOCATION" break fi done @@ -71,7 +70,7 @@ function go() { shift; shift if [[ -n "$LOCATION" ]]; then - __dive $CC "$UDEV/$SITE/$LOCATION/" $@ + __dive $CC "$LOCATION" $@ return $? else __dive $CC "$UDEV/$SITE" "$ARG3" $@ @@ -84,6 +83,11 @@ __dive() { WDIR=$2 shift; shift + if [ -z "$*" ]; then + $CC "$WDIR" + return $? + fi + OIFS=$IFS IFS="*" PATT="*$**"