chore: Add shellcheck ignores for checks that fail due to stdin change
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
# @brief Inquirer.js inspired prompts
|
# @brief Inquirer.js inspired prompts
|
||||||
|
|
||||||
_read_stdin() {
|
_read_stdin() {
|
||||||
|
# shellcheck disable=SC2162,SC2068
|
||||||
read $@ </dev/tty
|
read $@ </dev/tty
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,10 +24,12 @@ _key_input() {
|
|||||||
|
|
||||||
_read_stdin -rsn1 a
|
_read_stdin -rsn1 a
|
||||||
# is the first character ESC?
|
# is the first character ESC?
|
||||||
|
# shellcheck disable=SC2154
|
||||||
if [[ "$ESC" == "$a" ]]; then
|
if [[ "$ESC" == "$a" ]]; then
|
||||||
_read_stdin -rsn2 b
|
_read_stdin -rsn2 b
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# shellcheck disable=SC2154
|
||||||
local input="${a}${b}"
|
local input="${a}${b}"
|
||||||
# shellcheck disable=SC1087
|
# shellcheck disable=SC1087
|
||||||
case "$input" in
|
case "$input" in
|
||||||
@@ -88,6 +91,7 @@ _increment_selected() {
|
|||||||
input() {
|
input() {
|
||||||
_prompt_text "$1"; echo -en "\033[36m\c" >&2
|
_prompt_text "$1"; echo -en "\033[36m\c" >&2
|
||||||
_read_stdin -r text
|
_read_stdin -r text
|
||||||
|
# shellcheck disable=SC2154
|
||||||
echo -n "${text}"
|
echo -n "${text}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user