Complex quoting still gives me problems. With that disclaimer (after doing some experiments), I don't see anything wrong with what you are doing (in post #5) unless
you need those (what appear to be) variables evaluated when you give the command COMMAND_WRAPPER
. Variables are not evaluated inside single quotes. But when your function executes the command trac-admin
I would think the single quotes would already be dropped and the variables would get evaluated at that time.
A couple of things you might try (no promises):
You could replace the single quotes with double quotes. If you do that, then you need to "escape" the inner double quotes with a back slashes like so:
"\"The inner double quotes here are escaped with a back slash\""
The other thing you could try is totally removing the outer (single) quotes and changing this
$2 > /tmp/ws-man.tmp
$* > /tmp/ws-man.tmp
The shift throws away the existing first parameter and then changes the orignal second parameter to be first, original third parameter to be second, etc.
If none of this helps, maybe if you post the error message you are getting it will help somebody figure out what is wrong.
EDIT: Clarified that this post was in response to post #5