From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18969 invoked by alias); 10 Nov 2017 22:44:20 -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: List-Unsubscribe: X-Seq: 42007 Received: (qmail 15984 invoked by uid 1010); 10 Nov 2017 22:44:20 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-f175.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.192.175):SA:0(-4.7/5.0):. Processed in 5.70493 secs); 10 Nov 2017 22:44:20 -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=-4.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=Lpv5Ian1gJcij7coHTT4DjthbsoL+iVzZIGZ3Dw960E=; b=YoHpGUqiiesSh14JBhZSQbdEI7jFXFg3fpKFlUUehaymw0a0RPMlFgVyY82kMy2Gjw 01bLYYAP7M2mxgGae+2OQb4rIiEQgMM2fBNPsVqtGhpoxbfFEbEUFpScILZMrgZFj1+8 dVz4GVszwbvm2EHTwdP1AWyyL3w7KYH2lQHZ/MX8ZIdvknNVhtn3FDZ5Wtu3FdSyhnQb FuKbOfOCff3DtdurNPq4EuYaU5TG6+CI4S2o7KzMGKiSAu+eppCc7yqJq6zJdKYYD+m9 Rh7iD2KOV0rbL7m1wNjRFm+7oNoGusjFqHqGcGD2B4t3TIeDfqXnB/9gLKGuXaTlNNso UdNA== 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:in-reply-to:comments :references:to:subject:mime-version; bh=Lpv5Ian1gJcij7coHTT4DjthbsoL+iVzZIGZ3Dw960E=; b=YIKJGi0fa+9ClfuI5T2aNztXKNFDR3Cpp5+ANJuHkYeicahgat7ue94ovBzfmzGC6c UtWEYi7MvLrVL6k8f+ZQgkHGYIrvZwIqm5aCQ/UDmIXu1c6elVL5HZg5lieMIhvkkZhu LHfPm/Pv2anCHeaAFaUE5HwCV49gdoaO/rJSuawvC9Zj4e2T0BVRnnPN6iGoBHeUsIJa M9N4R77ZBfxyyWbDfhpZZ9g+2qQh9KuP13av0k3EGXeLFsrjUzy+AlMqAUti9/HP2Q0k w6LxanUJ4sv9H3evaF57q2VpakZ7vh/fXNFzK7FRnc2G7YHff0dExD2V15+j+HkmfnBL lbhg== X-Gm-Message-State: AJaThX61dfyCzBm57ZfMuVSj8kS163Sa4NLIhekbB+xBkAIm5T8XImRx 8JN1QI06x6ID4IEWKrR6sbEUlF9G X-Google-Smtp-Source: AGs4zMbcardY9B+e0AI+9AkXjrcV+iwlVmgxvUKd0yS9l5xoJ+nhb5C4p3+lbslW2GNHEOmJv0eGOQ== X-Received: by 10.101.78.207 with SMTP id w15mr1784433pgq.347.1510353851451; Fri, 10 Nov 2017 14:44:11 -0800 (PST) From: Bart Schaefer Message-Id: <171110143717.ZM16244@torch.brasslantern.com> Date: Fri, 10 Nov 2017 14:37:17 -0800 In-Reply-To: <0d6faa9a-fb69-8343-9630-a60d8f1bee0a@inlv.org> Comments: In reply to Martijn Dekker "[PATCH] don't exit shell on [[ -o invalid@option ]]" (Nov 10, 6:24pm) References: <0d6faa9a-fb69-8343-9630-a60d8f1bee0a@inlv.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh hackers list Subject: Re: [PATCH] don't exit shell on [[ -o invalid@option ]] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 10, 6:24pm, Martijn Dekker wrote: } } Does it make sense for [[ -o invalid@option ]] to exit the shell with an } error message? I have the impression that this was discussed on the list before, some time ago, and the conclusion was that it was useful to be able to tell [[ -o an_option_typo ]] apart from [[ -o an_unset_option ]]. In other words, if the option doesn't exist at all, then for any code depending on the result of the test, both the true and false branches may very well be wrong. It's easy enough to write backwards-compatible code by simply adding a subshell around the test, if that's what's intended. We could certainly suppress the error in emulation modes given that's what other shells do. Further, I'm not strongly invested in the current behavior even for native mode, but we should consider the ramifications.