Make osx-env-sync a little more robust, it was failing with empty parameter values and newer Zsh versions

This commit is contained in:
Danielle McLean 2019-09-24 13:55:17 +10:00
parent cb1fc9444b
commit 8036df0164
Signed by: 00dani
GPG key ID: FF6F9216852288FF

View file

@ -1,6 +1,6 @@
#!/bin/zsh
for name in ${(k)parameters}; do
[[ ${parameters[$name]} == scalar-export* ]] || continue
[[ ${parameters[$name]} == scalar-*export* ]] || continue
print $name=${(P)name}
launchctl setenv $name ${(P)name}
launchctl setenv $name "${(P)name}"
done