Skip to content

Commit 6dcc39f

Browse files
committed
src/modules/bash/parse_config.sh: Fix removing last occurence of *= in config key value, it should remove only first (i.e. key name and equal symbol).
1 parent 7ddf7ed commit 6dcc39f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/modules/bash/parse_config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ parse_config(){
3030
sections_array+=("$local_section")
3131
elif [[ "${local_temp_config_line,,}" =~ ^(name|owner|cpu-limit|delay|(lazy-)?exec-(un)?focus|command|mangohud(-source)?-config|fps-unfocus|fps-focus|idle|minimize)([[:space:]]+)?=([[:space:]]+)?* ]]; then # Exit with an error if type of line cannot be defined, regexp means [key name][space(s)?]=[space(s)?][anything else]
3232
# Remove key name and equal symbol
33-
local_config_value="${local_temp_config_line/*=/}"
33+
local_config_value="${local_temp_config_line#*=}"
3434
# Remove all spaces before and after string, internal shell parameter expansion required to get spaces supposed to be removed
3535
local_config_value="${local_config_value#"${local_config_value%%[![:space:]]*}"}" # Remove spaces in beginning for string
3636
local_config_value="${local_config_value%"${local_config_value##*[![:space:]]}"}" # Remove spaces in end of string

0 commit comments

Comments
 (0)