From: Bernd Steinhauser <linux@bernd-steinhauser.de>
To: zsh-users@zsh.org
Subject: Mapping quoted parameter in function
Date: Thu, 10 Nov 2016 07:20:17 +0100 [thread overview]
Message-ID: <0a521f25-d548-d3b1-fb2e-7559f7995b7d@bernd-steinhauser.de> (raw)
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
next reply other threads:[~2016-11-10 6:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-10 6:20 Bernd Steinhauser [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a521f25-d548-d3b1-fb2e-7559f7995b7d@bernd-steinhauser.de \
--to=linux@bernd-steinhauser.de \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).