Commit 49036c7e by Vincent Pelletier

shell: Escape literal end bracket in "case" patterns.

1 parent d6fd5a40
......@@ -778,7 +778,7 @@ EOF
ca_port=80
# Note: too bad there is no portable case fall-through...
case "$ca_netloc" in
*]:*)
*\]:*)
# Bracket-enclosed address, which may contain colons
ca_address="$(
printf "%s\\n" "$ca_netloc" | sed "s!^\\(.*\\]\\).*!\\1!"
......@@ -787,7 +787,7 @@ EOF
printf "%s\\n" "$ca_netloc" | sed "s!^[^\\]]*\\]:!!"
)"
;;
*]*)
*\]*)
# Bracket-enclosed address, which may contain colons
ca_address="$(
printf "%s\\n" "$ca_netloc" | sed "s!^\\(.*\\]\\).*!\\1!"
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!