Improve compatibility with bash 3. What are you doing apple?!

This commit is contained in:
vlad 2023-04-06 12:23:31 -07:00
parent b62ef700f4
commit e1b4e3ac9f

6
View File

@ -16,10 +16,10 @@ main() {
} }
redefine-functions-defined-with-selector-16() { redefine-functions-defined-with-selector-16() {
for function in $(compgen -c $(printf "⚡\uFE0F")); do for function in $(compgen -c $(printf "⚡\xEF\xB8\x8F")); do
original_definition="$(typeset -f $function)" original_definition="$(typeset -f $function)"
eval "${original_definition//$(printf "⚡\uFE0F")/⚡}" eval "${original_definition//$(printf "⚡\xEF\xB8\x8F")/⚡}"
unset $function unset -f $function
done done
} }