From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14878 invoked by alias); 14 Jan 2017 21:04:39 -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: 22387 Received: (qmail 1688 invoked from network); 14 Jan 2017 21:04:39 -0000 X-Qmail-Scanner-Diagnostics: from mercury.zanshin.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(64.84.47.142):SA:0(-0.0/5.0):. Processed in 0.766106 secs); 14 Jan 2017 21:04:39 -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=SPF_PASS 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 ipost.com designates 64.84.47.142 as permitted sender) Date: Sat, 14 Jan 2017 13:04:02 -0800 (PST) From: Bart Schaefer Reply-To: Bart Schaefer To: "zsh-users@zsh.org" Subject: Re: whence question In-Reply-To: <20170114201319.GA6210@fujitsu.shahaf.local2> Message-ID: References: <652bcc3f-7365-2e52-d39c-8576278606bc@eastlink.ca> <7b890e89-d01b-ab5c-32bf-b75bfa8d945c__41234.9168131643$1484374276$gmane$org@eastlink.ca> <20170114064807.GA31410@fujitsu.shahaf.local2> <20170114174622.GA12641@trex.cs.ovgu.de> <6237271484420924@web15h.yandex.ru> <20170114201319.GA6210@fujitsu.shahaf.local2> User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) X-Face: "f/X=UCVgd*^c>+x(gMq0at?e:woX+;'snkkRzc3SX<0AZ (/PS4.M2hzGS9X:Qj]at_H/%a9K}:-eS<"v_7vX84PG9Bf Zpb`wI!I4geY=or+nWq`3CX`oq&TJR;g^ps|7(MH?jh;bs %vHJfCh5>a*6Re5m|Bidja\\o]>n\A)ib1:yX*T`zR(*h~ %tOw<~!D9{e6h!8M2:d8G2@K>y^1I_Vdy\d\MYe]z7c MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1413522991-20997076-1484427842=:4560" --1413522991-20997076-1484427842=:4560 Content-Type: TEXT/PLAIN; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Sat, 14 Jan 2017, Nikolay Aleksandrovich Pavlov (ZyX) wrote: > (actually [nomatch] aborts execution: check difference between > `xxx-nonexistent-command-xxx ; echo abc` and `echo > xxx-nonexistent-file-xxx* ; echo abc`: first will show ?command not > found? message *and* `abc`, second will just show an error). This is in part relatively new behavior, see users/22338 (which I expected to spawn some discussion but has gone unanswered). > I have `NOMATCH` enabled also because I like Python ?explicit is better > then implicit? principle: if I mean glob expansion I write glob > expression and zsh either performs glob expansion or errors out. CSH_NULL_GLOB is quite useful if you are using several globs and don't know whether only some of them might match. Generates the error only if none of the globs match, silently removes the subset that don't if some of them do. On Sat, 14 Jan 2017, Daniel Shahaf wrote: > Semantically, the glob «*.foo» and the literal filename «'*.foo'» would > be different types, if the shell language were strongly typed. That's stretching things a bit. For that to be true, every command would have to declare the types of its arguments. In this particular case the shell does have "strong enough" data typing: quoted strings vs. not-quoted strings. The former are never wordlists (unless a well-typed expansion inside them is a wordlist) and the latter are always wordlists (which might result in only one word). You just have to explicitly declare the type by providing the quotes. --1413522991-20997076-1484427842=:4560--