From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6801 invoked by alias); 2 Jul 2012 17:19:08 -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: 17166 Received: (qmail 16284 invoked from network); 2 Jul 2012 17:19:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120702101820.ZM30699@torch.brasslantern.com> Date: Mon, 02 Jul 2012 10:18:20 -0700 In-reply-to: <1341245591.9491.140661096848393.5D4572DC@webmail.messagingengine.com> Comments: In reply to Ronald Fischer "passing modified parameter list to child" (Jul 2, 6:13pm) References: <1341245591.9491.140661096848393.5D4572DC@webmail.messagingengine.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: passing modified parameter list to child MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jul 2, 6:13pm, Ronald Fischer wrote: } Subject: passing modified parameter list to child } } I have two scripts, master and slave. When the master script calls the } slave script, it should pass all arguments to the slave (like in "$@"), } with the following twist: If the LAST argument of master does NOT start } with a dash, this argument should get a prefix "--use=". Requires extendedglob: argv[-1]="${argv[-1]/(#s)(#b)([^-])/--use=$match[1]}"