Here's a stripped down example of what I'm trying to do.
#!/usr/bin/env bash
set -x
echo "$@"
calling it with
bash script -vv --foo='bar baz'
yields
+ echo -vv 'foo=bar baz'
-vv foo=bar baz
Note that the + line (i.e the debug line) is putting single quotes around the entire foo=bar baz. I need it to pass
foo='bar baz'
not
'foo=bar baz'
I have tried several iterations to no avail. Is there a way to get it to pass the former?