Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Mapping quoted parameter in function
- X-seq: zsh-users 22107
- From: Bernd Steinhauser <linux@xxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Mapping quoted parameter in function
- Date: Thu, 10 Nov 2016 07:20:17 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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