From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15026 invoked by alias); 10 Nov 2016 06:30:17 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22107 Received: (qmail 9754 invoked from network); 10 Nov 2016 06:30:16 -0000 X-Qmail-Scanner-Diagnostics: from outbound2.flatbooster.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(84.200.223.10):SA:0(-2.9/5.0):. Processed in 1.453945 secs); 10 Nov 2016 06:30:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=qAyv=W3=bernd-steinhauser.de=linux@flatbooster.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at flatbooster.com does not designate permitted sender hosts) X-Virus-Scanned: Debian amavisd-new at outbound2.flatbooster.com To: zsh-users@zsh.org From: Bernd Steinhauser Subject: Mapping quoted parameter in function Message-ID: <0a521f25-d548-d3b1-fb2e-7559f7995b7d@bernd-steinhauser.de> Date: Thu, 10 Nov 2016 07:20:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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