indent/outdent mismatch when using multi-line array assignment inside case…esac
My go-to way of quickly parsing arguments is as follows:
#!/bin/bash
quiet="true"
files=()
for arg in "${@}"; do
case "${arg}" in
"-v" | "--verbose")
quiet="false"
;;
*)
files+=(
"${arg}"
)
;;
esac
done
Beautysh (v6.1.0) incorrectly reports this as indent/outdent mismatch and instead indents it like so:
#!/bin/bash
quiet="true"
files=()
for arg in "${@}"; do
case "${arg}" in
"-v" | "--verbose")
quiet="false"
;;
*)
files+=(
"${arg}"
)
;;
esac
done
The deciding factor seems to be the multi-line parenthesis in assigning files. If I assign it all on one line, like this:
files+=("${arg}")
then beautysh is satisfied with the indentation (i.e. doesn’t change it or report a mismatch).
Steps to reproduce
media.autoplay.defaultto1(”Block Audio”, which is the default)media.autoplay.blocking_policyto2What I expect to happen
For the audio to be unmuted.
What happens instead
The audio remains muted, and the volume control/indicator remains in the muted position.
I’m unmotivated to report this to Twitch, as I’m unsure about the precise meaning of
media.autoplay.blocking_policy, and I currently don’t use the non-working value for it myself. Feel free to downprioritize this as you see fit, unless the original reporter is still affected. Here’s my downstream report over at Launchpad though, just for reference. (I’ll update it too.)