From b83def7c1132de9d86a322d85e71534c789f149d Mon Sep 17 00:00:00 2001 From: shanghai yakisoba chan! Date: Sun, 21 Feb 2021 16:19:19 +0900 Subject: [PATCH] Updated SC2164 (markdown) --- SC2164.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SC2164.md b/SC2164.md index 85c64ef..2450bd5 100644 --- a/SC2164.md +++ b/SC2164.md @@ -37,6 +37,7 @@ To avoid this, make sure you handle the cases when `cd` fails. Ways to do this i * `cd foo || exit` as suggested to abort immediately, reusing exit code from failed `cd` command * `cd foo || { echo "Failure"; exit 1; }` abort with custom message +* `cd foo || ! echo "Failure"` omitting "abort with custom message" * `if cd foo; then echo "Ok"; else echo "Fail"; fi` for custom handling * `<(cd foo && cmd)` as an alternative to `<(cd foo || exit; cmd)` in `<(..)`, `$(..)` or `( )`