_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.
This commit is contained in:
kt programs 2023-01-30 10:31:13 +08:00
parent 4941cdb074
commit b8ff2ea08b

View File

@ -132,7 +132,7 @@ _get_proc_restore_command() {
if [[ "$restore_element" =~ " ${inline_strategy_arguments_token}" ]]; then if [[ "$restore_element" =~ " ${inline_strategy_arguments_token}" ]]; then
# replaces "%" with command arguments # replaces "%" with command arguments
local command_arguments="$(_get_command_arguments "$pane_full_command" "$match")" 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 else
echo "$restore_element" echo "$restore_element"
fi fi