From 06dae018ff0b41bc6140a603f5cbf2b54b2fd3ae Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 17 Dec 2018 15:10:18 +1300 Subject: Use `command` consistently, silence ShellCheck ShellCheck (SC2164) is upset about these `cd` commands where the return type isn't being checked, but they're all by design, as they're the last command in the function, and thereby constitute the function's return value implicitly. Otherwise, this commit changes the shrc.d and profile.d subfiles to use the `command` wrapper only where it's actually needed. --- sh/shrc.d/gd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sh/shrc.d/gd.sh') diff --git a/sh/shrc.d/gd.sh b/sh/shrc.d/gd.sh index 9f6a43e7..b9af480e 100644 --- a/sh/shrc.d/gd.sh +++ b/sh/shrc.d/gd.sh @@ -14,5 +14,6 @@ gd() { fi # Go to the marked directory - cd -- "$PMD" || return + # shellcheck disable=SC2164 + cd -- "$PMD" } -- cgit v1.2.3