aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-23 20:34:47 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-23 20:38:17 +1200
commit688d1c9ea0d6088f821cea75c27978aace825217 (patch)
tree983ebac05a098be39942fef75be953bb0ce4ac49 /sh
parentAdd missing self var to edda(1) (diff)
downloaddotfiles-688d1c9ea0d6088f821cea75c27978aace825217.tar.gz
dotfiles-688d1c9ea0d6088f821cea75c27978aace825217.zip
Explicitly return from failed `cd` call in scr()
Diffstat (limited to 'sh')
-rw-r--r--sh/shrc.d/scr.sh2
1 files changed, 1 insertions, 1 deletions
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
}