address shellcheck false positive

This commit is contained in:
Robin Wöhler 2024-05-15 07:36:19 +02:00
parent 9617f1bab2
commit 3a7b1361f0

View File

@ -70,7 +70,9 @@ _atuin_search() {
zle accept-line
elif [[ $LBUFFER =~ ^__atuin_edit_at__:([0-9]+):(.*)$ ]]
then
# shellcheck disable=SC2154 # $match array contains the regexp groups
local POS=${match[1]}
# shellcheck disable=SC2154 # $match array contains the regexp groups
local LINE=${match[2]}
LBUFFER="${LINE[0,${POS}]}"
RBUFFER="${LINE[$((POS+1)),${#LINE}]}"