I may have this function in a bash script that gets sourced to the shell
function suman{
echo "using suman function"
}
if I call
unset suman
things seem to work as expected
however if I have this as my function:
function suman-inspect {
echo "using suman-inspect function"
}
then if I call
unset suman-inspect
or
unset "suman-inspect"
I get this message:
bash: unset: `suman-inspect': not a valid identifier
How can unset this variable as is?
After some more research, it appears that
will work. This is surprising because
unset sumandid work, and did successfully unset the suman function (as far as I could tell).