From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10447 invoked by alias); 16 Apr 2017 04:09:18 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40978 Received: (qmail 9560 invoked from network); 16 Apr 2017 04:09:18 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f178.google.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(209.85.217.178):SA:0(-0.0/5.0):. Processed in 3.213799 secs); 16 Apr 2017 04:09:18 -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=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.178 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:to:subject:mime-version; bh=ql1X9LFeMRxdl0KKA4odZTeQUhePco/qouyQXMYHTOY=; b=RqSs1JtSvDtwWmG/tIe1ZYl343iGiqgcpZIoLpd1AyAvvcuHTZkeqDGu3UPmK1k9Cv okuFq5BW9PTgmZbqpiZWNahpAmuabOD/9i1aRNsP+Th1l3I9VoFjQ0D3+CYtpoQdTd99 Ghh2Mqh3YcHRZ0AVIYhfpmx7JvQcPdPB5+1iHLwJDi2+KI1dr+du2k5CqACbQmnvzNBV yJ9byA2+eHeezouRzPzDCBTEVbtr7P6/uV1zqsBORqquJNeJZ83MsVVeKRea3ZH0ja5W 2OMdbMP3CVShxs5WbH3tE0sgjuphELhG4zgzeT+n3dnTRfb+vNlrE+jQAIEhQMbPwm8O lu0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:to:subject:mime-version; bh=ql1X9LFeMRxdl0KKA4odZTeQUhePco/qouyQXMYHTOY=; b=D5fVWNi4vSxeZGJ4VtUB/PC2EidOKT0HCn8gFfyuCFqehSYg+2COIoLjjOBu5xvn/T JEWs11C9ZB/9zIgWsG4lGn8D+eT2aLRG1i0tQN02hnUbsf55/EaTWiIWYQnyXbzJL1/2 mN1z9SFKBWWzpo/73L+09w0DSM0oURj2heB0oLYaHd4FLiJ0LnN4eX16CHtm/obxvcPA hcE34ff1dbOUAjAIpGajjT5Tb5JD86GBTHorPlnjqqPv1aKeFwVl0EX/y86oceff4Nyi QHGG5m+Yxht9quUrlgzb9PEY9xoVz9trMLpeXz3qBhdd1Otzde1kuuWUxmczoQZ6p/B3 I4Nw== X-Gm-Message-State: AN3rC/4F0ZRF9q7KRuYL1aBwGzFmBqNce2dSa01eCodcgxek7gu691+W 4WtfCe1B1LfRBWX2 X-Received: by 10.159.34.129 with SMTP id 1mr7539064uan.25.1492315746115; Sat, 15 Apr 2017 21:09:06 -0700 (PDT) From: Bart Schaefer Message-Id: <170415210934.ZM24985@torch.brasslantern.com> Date: Sat, 15 Apr 2017 21:09:34 -0700 X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Additional arguments to "emulate -c" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii As presently implemented, emulate zsh -c first rest will produce the error "emulate: unknown argument rest". The intention here was that the -c option would behave akin to -c in the options at shell startup that is in zsh -c first rest only "first" is interpreted as a command, and "rest" (etc.) becomes $@ for the top-level shell. However, there doesn't seem to be any other reason for "emulate -c" to behave as it currently does. So the question is, should "emulate -c": 1. Stay exactly as it is, i.e., error on extra arguments? 2. Assign arguments to $@, ala "set -- rest", before eval'ing "first"? 3. Pass all of the non-option arguments following -c, to "eval"? Of these, 2 is the most complicated to implement, and raises the added question of whether $@ should be set only for the duration of the eval, somewhat as if "emulate" was itself a shell function, or should instead persist as the emulation mode itself does. In the absence of feedback, #1 wins.