On Tue, May 31, 2022 at 07:23:18AM -0400, Ionen Wolkens wrote:
> +                     if [[ ${contents[i]} != "${newcontents}" ]]; then
> +                             changed=1
> +                             [[ -v verbose ]] || break
> +                     fi
> +
> +                     [[ -v verbose ]] &&
> +                             diff -u --color --label="${files[i]}"{,} \
> +                                     <(echo "${contents[i]}") <(echo 
> "${newcontents}")

self nitpick, didn't think much of these given optional but diff has
nothing to say if contents == newcontents so will replace with:

if [[ ${contents[i]} != "${newcontents}" ]]; then
        changed=1

        [[ -v verbose ]] || break

        diff -u --color --label="${files[i]}"{,} \
                <(echo "${contents[i]}") <(echo "${newcontents}")
fi

> +             [[ ${contents} != "${newcontents}" ]] && changed=1
> +
> +             [[ -v verbose ]] &&
> +                     diff -u --color --label="${files[*]}" 
> --label="${_esed_output}" \
> +                             <(echo "${contents}") <(echo "${newcontents}")

and:

if [[ ${contents} != "${newcontents}" ]]; then
        changed=1

        [[ -v verbose ]] &&
                diff -u --color --label="${files[*]}" --label="${_esed_output}" 
\
                        <(echo "${contents}") <(echo "${newcontents}")
fi

(updated on github PR)

-- 
ionen

Attachment: signature.asc
Description: PGP signature

Reply via email to