diff --git a/gis b/gis index 62cb155..81f9749 100755 --- a/gis +++ b/gis @@ -45,12 +45,14 @@ while (( "$#" )); do done # Add $GIS_PATH or current work directory to paths if none is given -if [ "$GIS_PATH" ]; then - OLDIFS=$IFS - IFS=":" read -r -a paths <<< "$GIS_PATH" - IFS=$OLDIFS -elif [ "${paths[*]}" == "" ]; then - paths=("$(pwd)") +if [ "${paths[*]}" == "" ]; then + if [ "$GIS_PATH" ]; then + OLDIFS=$IFS + IFS=":" read -r -a paths <<< "$GIS_PATH" + IFS=$OLDIFS + else + paths=("$(pwd)") + fi fi # Find Git repositories