Well, how to do this, you need to use the eval function associated with escape - '$':
function run() { eval $* } my_command="ls \$(pwd)"
Escaping '$' as '\ $' ensures that my_command will be set to "ls $ (pwd)" without replacement. Then eval will provide a replacement ^^
then
run $my_command cd .. run $my_command
Prove that you get your functionality!
my2c
neuro source share