aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbostuff.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbostuff.sh b/sbostuff.sh
index 84b77d9..7de15f5 100644
--- a/sbostuff.sh
+++ b/sbostuff.sh
@@ -95,7 +95,13 @@ EOF
echo "cdsb: no exact match, guessing dir" 1>&2
dir="$( _cdsbexp $SBO_GITROOT/*/$1* )"
[ -z "$dir" ] && dir="$( _cdsbexp $SBO_GITROOT/*/*$1* )"
- [ -n "$dir" ] && cd "$dir" || echo "cdsb: no match" 1>&2
+ if [ -n "$dir" ]; then
+ cd "$dir"
+ return "$?"
+ else
+ echo "cdsb: no match" 1>&2
+ return 1
+ fi
fi
eval $oldshopt