Make zsh-compatible.

This commit is contained in:
Shy 2024-08-08 19:53:24 +02:00
parent b764a46ded
commit 654b7ff480

5
wled
View file

@ -13,6 +13,11 @@ VERSION="0.1.3"
exit_code=0 exit_code=0
host_list= host_list=
# Shell specific options.
case "$(readlink /proc/$$/exe)" in
*/zsh) setopt SH_WORD_SPLIT ;;
esac
# Make the exit status of command pipelines the status of the last command # Make the exit status of command pipelines the status of the last command
# with non-zero exit status - if supported by this shell. # with non-zero exit status - if supported by this shell.
(set -o pipefail 2>/dev/null) && set -o pipefail (set -o pipefail 2>/dev/null) && set -o pipefail