Skip to content

Commit 280d256

Browse files
committed
Disable some annoying shellcheck warnings
Shellcheck persists in not realizing that `echo "$(command) blah blah"` doesn't need another layer of double quotes. Signed-off-by: Joe Block <[email protected]>
1 parent 5635e92 commit 280d256

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

bin/ansi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# © Copyright 2015 Tyler Akins
66
# Licensed under the MIT license with an additional non-advertising clause
77
# See http://github.com/fidian/ansi
8+
# shellcheck disable=SC2004
89

910
add-code() {
1011
local N

bin/iterm2-tab-color

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function has() {
2626
}
2727

2828
if [[ ! -n "$ITERM_SESSION_ID" ]]; then
29+
# shellcheck disable=SC2086
2930
fail "$(basename $0) only works in iTerm 2"
3031
fi
3132

@@ -34,5 +35,6 @@ if [[ $# == 3 ]]; then
3435
echo -ne "\033]6;1;bg;green;brightness;$2\a"
3536
echo -ne "\033]6;1;bg;blue;brightness;$3\a"
3637
else
38+
# shellcheck disable=SC2086
3739
fail "$(basename $0) requires 3 arguments for the red, green and blue values to set the tab to"
3840
fi

bin/tab-blue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Set a tab blue
44
#
5-
# Copyright 2022, Joe Block <[email protected]>
5+
# Copyright 2022-2025, Joe Block <[email protected]>
66

77
set -o pipefail
88
if [[ -n "$DEBUG" ]]; then
@@ -30,6 +30,7 @@ if ! has iterm2-tab-color; then
3030
fi
3131

3232
if [[ ! -n "$ITERM_SESSION_ID" ]]; then
33+
# shellcheck disable=SC2086
3334
fail "$(basename $0) only works in iTerm 2"
3435
fi
3536

bin/tab-green

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Set a tab green
44
#
5-
# Copyright 2022, Joe Block <[email protected]>
5+
# Copyright 2022-2025, Joe Block <[email protected]>
66

77
set -o pipefail
88
if [[ -n "$DEBUG" ]]; then
@@ -30,6 +30,7 @@ if ! has iterm2-tab-color; then
3030
fi
3131

3232
if [[ ! -n "$ITERM_SESSION_ID" ]]; then
33+
# shellcheck disable=SC2086
3334
fail "$(basename $0) only works in iTerm 2"
3435
fi
3536

bin/tab-red

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#
33
# Set a tab red
44
#
5-
# Copyright 2022, Joe Block <[email protected]>
5+
# Copyright 2022-2025, Joe Block <[email protected]>
6+
# shellcheck disable=SC2004
67

78
set -o pipefail
89
if [[ -n "$DEBUG" ]]; then
@@ -30,6 +31,7 @@ if ! has iterm2-tab-color; then
3031
fi
3132

3233
if [[ ! -n "$ITERM_SESSION_ID" ]]; then
34+
# shellcheck disable=SC2086
3335
fail "$(basename $0) only works in iTerm 2"
3436
fi
3537

0 commit comments

Comments
 (0)