Turns out we only supported bash 4.3, this commit swaps typeset for eval

This commit is contained in:
Dylan 2016-01-21 00:37:31 +11:00
parent 928bbf0760
commit db26756ea7
1 changed files with 4 additions and 5 deletions

9
fetch
View File

@ -1319,14 +1319,13 @@ printinfo () {
function=${info#*: }
subtitle=${info%:*}
# Update the var
case "$function" in
"get"*)
var=${function/get/}
typeset -n output=$var
# Call the function
[ -z "$output" ] && $function
$function 2>/dev/null
# Update the variable
eval output="\$${function/get/}"
;;
esac