diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-17 15:10:18 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-17 15:12:55 +1300 |
commit | 06dae018ff0b41bc6140a603f5cbf2b54b2fd3ae (patch) | |
tree | 7be425ef1a1eb11ad6f7ff1c8d55bb0f06e0d6d0 /sh/shrc.d/scr.sh | |
parent | Add /j flag to :vimgrep shortcut (diff) | |
download | dotfiles-06dae018ff0b41bc6140a603f5cbf2b54b2fd3ae.tar.gz dotfiles-06dae018ff0b41bc6140a603f5cbf2b54b2fd3ae.zip |
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.
Diffstat (limited to 'sh/shrc.d/scr.sh')
-rw-r--r-- | sh/shrc.d/scr.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sh/shrc.d/scr.sh b/sh/shrc.d/scr.sh index 9af8dd74..14a58ad1 100644 --- a/sh/shrc.d/scr.sh +++ b/sh/shrc.d/scr.sh @@ -2,5 +2,6 @@ # 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}")" || return + # shellcheck disable=SC2164 + cd -- "$(mktd "${1:-scr}")" } |