From b8ff2ea08be920e626ad4ba158746e564dfc71b4 Mon Sep 17 00:00:00 2001 From: kt programs Date: Mon, 30 Jan 2023 10:31:13 +0800 Subject: [PATCH] _get_proc_restore_command: use "," as sed delimiter When command_arguments contains a path, there are too many delimiters for sed, which causes it to not replace properly. The result of this is that the original command gets executed without remapping and/or expanding the arguments. --- scripts/process_restore_helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/process_restore_helpers.sh b/scripts/process_restore_helpers.sh index 8bf5a78..546dfe1 100644 --- a/scripts/process_restore_helpers.sh +++ b/scripts/process_restore_helpers.sh @@ -132,7 +132,7 @@ _get_proc_restore_command() { if [[ "$restore_element" =~ " ${inline_strategy_arguments_token}" ]]; then # replaces "%" with command arguments local command_arguments="$(_get_command_arguments "$pane_full_command" "$match")" - echo "$restore_element" | sed "s/${inline_strategy_arguments_token}/${command_arguments}/" + echo "$restore_element" | sed "s,${inline_strategy_arguments_token},${command_arguments}," else echo "$restore_element" fi