Skip to content

Commit 431fc4b

Browse files
committed
fix: remove all shellcheck directives
ShellCheck directives are of course commented, but OpenSSH¹ has multiple instances where `#` is not followed by a space: `#shellcheck disable...`² instead of `# shellcheck disable...`. The upgraded `shellcheck_d` function now removes both types using vintage POSIX-compliant `sed`. 1. openssh/openssh-portable@108676c3f2 2. https://github.com/openssh/openssh-portable/blob/108676c3f2/contrib/ssh-copy-id#L298 Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
1 parent 4ab2a10 commit 431fc4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom/aliases.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8277,8 +8277,8 @@ shellcheck_d() {
82778277
command -p -- rm -f -- "${TMPDIR:-${TEMP:-${TMP:-/tmp}}}"'/'"${1##*/}" &&
82788278
command -p -- cp -f -p -- "${1-}" "${TMPDIR:-${TEMP:-${TMP:-/tmp}}}"'/'"${1##*/}" &&
82798279
command -p -- sed \
8280-
-e '/\#[[:blank:]][[:blank:]]*shellcheck[[:blank:]][[:blank:]]*disable/ d' \
8281-
-e 's/[[:blank:]]*\#[[:blank:]][[:blank:]]*shellcheck[[:blank:]][[:blank:]]*shell=\(.*\)sh/#!\/usr\/bin\/env \1sh/' \
8280+
-e '/\#[[:blank:]]*shellcheck[[:blank:]][[:blank:]]*disable/ d' \
8281+
-e 's/[[:blank:]]*\#[[:blank:]]*shellcheck[[:blank:]][[:blank:]]*shell=\(.*\)sh/#!\/usr\/bin\/env \1sh/' \
82828282
"${TMPDIR:-${TEMP:-${TMP:-/tmp}}}"'/'"${1##*/}" \
82838283
>"${1-}"
82848284
shift

0 commit comments

Comments
 (0)