From cc6d88e79be0fefc7536e5dc1ac3ba40e524ac18 Mon Sep 17 00:00:00 2001 From: gsell Date: Tue, 16 Jul 2024 10:10:04 +0200 Subject: [PATCH] Resolve "lisbstd.bash: in function std::replace_path use empty string as default for 'replacestr'" --- Pmodules/libstd.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pmodules/libstd.bash b/Pmodules/libstd.bash index d3b9b0c..65c2a0f 100644 --- a/Pmodules/libstd.bash +++ b/Pmodules/libstd.bash @@ -152,7 +152,7 @@ std::remove_path() { std::replace_path () { local -r path="$1" local -r removepat="$2" - local -r replacestr="$3" + local -r replacestr="${3:-''}" local -r removestr=$(echo "${!path}" | tr ":" "\n" | grep -m 1 "^$removepat\$") export $path="$(echo "${!path}" | tr ":" "\n" | sed "s:^${removestr}\$:${replacestr}:" |