From 321b3ebcea3a8b4a5409ddde3c1256979fff1531 Mon Sep 17 00:00:00 2001 From: Sebastian Sellmeier Date: Tue, 22 Feb 2022 21:27:01 +0100 Subject: [PATCH] Fix Shellcheck by also quoting the inner variable (reference: https://github-wiki-see.page/m/koalaman/shellcheck/wiki/SC2295) --- betterlockscreen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/betterlockscreen b/betterlockscreen index 723c3e9..47bb3b5 100755 --- a/betterlockscreen +++ b/betterlockscreen @@ -606,8 +606,8 @@ update () { local geometry="${dinfo[2]}" read -r -a cols <<< "${geometry//[x+-]/ }" - local position="${geometry#*${cols[1]}}" - local resolution="${geometry%${position}*}" + local position="${geometry#*"${cols[1]}"}" + local resolution="${geometry%"${position}"*}" if [[ $id -eq "$display_on" ]] || [[ "$display_on" -eq 0 ]]; then