zsh-users
 help / color / mirror / code / Atom feed
* Mapping quoted parameter in function
@ 2016-11-10  6:20 Bernd Steinhauser
  2016-11-10 12:29 ` Clint Hepner
  0 siblings, 1 reply; 4+ messages in thread
From: Bernd Steinhauser @ 2016-11-10  6:20 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <0a521f25-d548-d3b1-fb2e-7559f7995b7d__49592.623851686$1478759489$gmane$org@bernd-steinhauser.de>]

end of thread, other threads:[~2016-11-13  4:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-10  6:20 Mapping quoted parameter in function Bernd Steinhauser
2016-11-10 12:29 ` Clint Hepner
2016-11-10 16:48   ` Bernd Steinhauser
     [not found] <0a521f25-d548-d3b1-fb2e-7559f7995b7d__49592.623851686$1478759489$gmane$org@bernd-steinhauser.de>
2016-11-10 16:10 ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).