From 688d1c9ea0d6088f821cea75c27978aace825217 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 23 Aug 2016 20:34:47 +1200 Subject: Explicitly return from failed `cd` call in scr() --- sh/shrc.d/scr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sh/shrc.d/scr.sh') diff --git a/sh/shrc.d/scr.sh b/sh/shrc.d/scr.sh index 255b9322..9af8dd74 100644 --- a/sh/shrc.d/scr.sh +++ b/sh/shrc.d/scr.sh @@ -2,5 +2,5 @@ # files into $HOME, and making the system do cleanup for me. Single optional # argument is the string to use for naming the directory; defaults to "scr". scr() { - cd -- "$(mktd "${1:-scr}")" + cd -- "$(mktd "${1:-scr}")" || return } -- cgit v1.2.3