Skip to content

Commit 3184022

Browse files
RSC_HELP_URL: escape forward slashes to avoid syntax errors in 'sed'
1 parent c74c521 commit 3184022

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/rsc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ function rsc_help {
14931493
mapfile -t bfr < <(help "${@}")
14941494
if grep -q -F "{{SEE_ALSO}}" <<< "${bfr[@]}"; then
14951495
if [[ -n ${RSC_HELP_URL} ]]; then
1496-
mapfile -t bfr < <(printf "%s\n" "${bfr[@]}" | sed "s/{{SEE_ALSO}}/See also:\n * ${RSC_HELP_URL}/")
1496+
mapfile -t bfr < <(printf "%s\n" "${bfr[@]}" | sed "s/{{SEE_ALSO}}/See also:\n * <${RSC_HELP_URL//\//\\/}>/")
14971497
else
14981498
mapfile -t bfr < <(printf "%s\n" "${bfr[@]}" | sed "/{{SEE_ALSO}}/{ N; d }")
14991499
fi

0 commit comments

Comments
 (0)