mirror of
https://github.com/rcaloras/bash-preexec.git
synced 2026-11-03 14:39:43 -09:00
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:
parent
aab0589add
commit
3440806a53
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue