Suppress shellcheck false positives

These are oversights of commit 21a26bf.

* Suppress SC2128 for array PROMPT_COMMAND
* Suppress SC2016 for the command string containing expansions like
  '__bp_install "$_"'
This commit is contained in:
Koichi Murase 2024-02-03 15:10:10 +09:00
parent aab0589add
commit 3440806a53

View file

@ -71,6 +71,7 @@ __bp_inside_precmd=0
__bp_inside_preexec=0
# Initial PROMPT_COMMAND string that is removed from PROMPT_COMMAND post __bp_install
# shellcheck disable=SC2016
__bp_install_string='__bp_install "$_"'
# Fails if any of the given variables are readonly
@ -378,6 +379,7 @@ fi
__bp_install() {
local lastexit=$? lastarg=$_
# Exit if we already have this installed.
# shellcheck disable=SC2016
if [[ "${PROMPT_COMMAND[*]:-}" == *'__bp_precmd_invoke_cmd "$_"'* ]]; then
return 1
fi