aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-11-25 21:52:00 -0500
committerB. Watson <yalhcru@gmail.com>2020-11-25 21:52:00 -0500
commita24cd14d27f6e43ef614a4625f4688eb44942033 (patch)
tree5ed977aec20c213a35b3c69b1ef2920a8450ae52
parent43b060d644d3e376a4142b8f3a66c417327b1c75 (diff)
downloadsbostuff-a24cd14d27f6e43ef614a4625f4688eb44942033.tar.gz
sbostuff.sh: fix cdsb alias
-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