Closed tombh closed 2 years ago
I feel like I must be missing something obvious, my apologies if so. I want to do something like this:
function _get_contents_of_function { local func=$1 # shellcheck disable=2086 declare -f $func # because "$func" doesn't work }
Have I got the wrong code, or shellharden doesn't support any kind of ignoring? Or is this kind of meta programming just not supported by shellharden?
It was something obvious, my own bug elsewhere in my code! declare -f "$func" does indeed work 🤦
declare -f "$func"
I feel like I must be missing something obvious, my apologies if so. I want to do something like this:
Have I got the wrong code, or shellharden doesn't support any kind of ignoring? Or is this kind of meta programming just not supported by shellharden?