Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Mapping quoted parameter in function



Hi,

I'm using a program that expects a parameter (actually multiple parameters) in the form
program "foo='bar'"

Because the cmdline for that program gets quite long, I wrote a function to call it and change parameters easily,it looks roughly like this:
progfunc() {
CORES=12
    program -n ${CORES} "foo='bar'" foo2="1 $3"
}

What I would want to do is to ensure that if I call
`progfunc x`

this would translate into "foo='x'", without touching the rest of the call.
Is that somehow possible?
iirc, variables won't work, because of the quoting style?

Best Regards,
Bernd



Messages sorted by: Reverse Date, Date, Thread, Author