From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29625 invoked by alias); 12 Feb 2018 17:03:26 -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: 42361 Received: (qmail 4253 invoked by uid 1010); 12 Feb 2018 17:03:26 -0000 X-Qmail-Scanner-Diagnostics: from mailout1.w1.samsung.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(210.118.77.11):SA:0(-1.9/5.0):. Processed in 11.184584 secs); 12 Feb 2018 17:03:26 -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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180212170310euoutp0144f7837f0672dd23ee77c7c7ffbaee27~SosTe8fql2213422134euoutp01N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1518454990; bh=/e+WTNIM2o8FlWya5txtxP4SAkjQRmKim8kh8svZAUY=; h=Date:From:To:Subject:In-reply-to:References:From; b=i1Xw+9kXVVQLkQmt6pFdhKvpg0YH/hyP3cjUiER8/0yD8spLXqi5QXHnnALoohtEi yqrQd9cdxJHGC2LkM13DoE59Ysc888H3Vi3e4VkAz+L1TRbRQPe3na6S6M8uRqmf3T I9/zkiVF1IoH6PGT+Ehn6jdQgvbuBHhVnVZLiDN0= X-AuditID: cbfec7f4-6f9ff700000043e4-2a-5a81c8cdf419 Date: Mon, 12 Feb 2018 17:03:04 +0000 From: Peter Stephenson To: =?UTF-8?B?xaBpbW9u?= Let , zsh-workers@zsh.org Subject: Re: Issue: Handling of globbing fails Message-id: <20180212170304.0a534bf4@pwslap01u.europe.root.pri> In-reply-to: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPIsWRmVeSWpSXmKPExsWy7djPc7pnTzRGGRz9JW2x/Hk/q8XB5odM DkweO2fdZfdYdfADUwBTFJdNSmpOZllqkb5dAldG96yJjAU/uStuTe9ja2D8xtHFyMkhIWAi 8eruFqYuRi4OIYEVjBJfHq1mg3A+M0psm3CTBabqeud3RojEMkaJp69vQzn/GCX+fb/MDlIl JHCGUaJpQwBE4iyjxK9D/9lAEiwCqhK97Q1MIDabgKHE1E2zGUFsEQFPiYZ158FWCAvoSZy8 cxMszitgL9G+9zdYL6dAsMTV7s9gC/gF9CWu/v3EBHGSvcTMK2eg6gUlfky+BzaHWUBTYuvu 9ewQtrbEk3cXWCHqF7BJbH+jBWG7SFzaOZ8dwhaWeHV8C5QtI3F5cjfUy/2MEk+6fUGekRCY wShx+swONoiEtUTf7YuMEAv4JCZtm87cxcgBFOeV6GgTgijxkDj8YSEzhO0osXvJKmZIoCxh lPh/6gP7BEb5WUjunoXk7llI7l7AyLyKUTy1tDg3PbXYKC+1XK84Mbe4NC9dLzk/dxMjMBmc /nf8yw7GXX+SDjEKcDAq8fB2zG6MEmJNLCuuzD3EKMHBrCTC+6cZKMSbklhZlVqUH19UmpNa fIhRmoNFSZw3TqMuSkggPbEkNTs1tSC1CCbLxMEp1cC4pGySZ966kw0VmxwSHBNUxC9vlv9i mbLhuHiRsOak/YIdGlLBdx4vl5ul/OHV1xkvngUr3T1Q+9akrXmvzvH5QSb+D3Ify3tsVd0l 9Ynn9RIJlbz9oqdOJFwSXyo6d5qWWO+h1K6kjNwn6i/nz2lL9Fjuv+al9wyW/WyTJ/y4Un9P aNP/LSICSizFGYmGWsxFxYkA7sSfWgIDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPLMWRmVeSWpSXmKPExsVy+t/xy7pnTjRGGRz8r2ix/Hk/q8XB5odM DkweO2fdZfdYdfADUwBTFJdNSmpOZllqkb5dAldG96yJjAU/uStuTe9ja2D8xtHFyMkhIWAi cb3zO2MXIxeHkMASRonW+YvYIZwGJoml796zQDjnGCU271/FCuGcZZRYeOoxC0g/i4CqRG97 AxOIzSZgKDF102xGEFtEwFOiYd15sBphAT2Jk3dugsV5Bewl2vf+ZgOxOQWCJTbNP8AGMXQZ o8S6/91gCX4BfYmrfz8xQRxoLzHzyhmoZkGJH5PvgQ1lFlCXmDRvETOErS3x5N0FVhBbCCh+ 4+5u9gmMQrOQtMxC0jILScsCRuZVjCKppcW56bnFRnrFibnFpXnpesn5uZsYgcG87djPLTsY u94FH2IU4GBU4uHtmN0YJcSaWFZcmXuIUYKDWUmE908zUIg3JbGyKrUoP76oNCe1+BCjNAeL kjjveYPKKCGB9MSS1OzU1ILUIpgsEwenVAOjx06Xi5fF06ZMmnNzUaxF6naN+ZtmhvzkL5or 1uq0YKZIum3Piq23XIuXnrmVt7axrV876YAUkxAvy5Um+7iYf+zM/yuaHy02qZW8ds+sjXcJ E+8t37MT+W8mHn+/sn6f04ePJw0nP/FttPPe7LvkxqyFkrPjegvPG9Swb752813jR8/9QsFS SizFGYmGWsxFxYkAm2ffBmICAAA= X-CMS-MailID: 20180212170308eucas1p2751a24f952f8634125547ab7a2e61944 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180212163514epcas5p34a9c8c3dd91cc702e72871cb009648ef X-RootMTR: 20180212163514epcas5p34a9c8c3dd91cc702e72871cb009648ef References: On Mon, 12 Feb 2018 17:34:11 +0100 =C5=A0imon Let wrote: > Consider running following command: >=20 > `echo some_empty_directory/* && echo "NO FAIL" || echo "FAIL"` >=20 > It produces following output: >=20 > `zsh: no matches found: some_empty_dir/*` Yes, it's an error, and is documented as such. Please read the documentation for 'filename generation' and in particular the second paragraph below where you'll also see how to modify it. Shells have this sort of thing hard coded at a low level and have done for a long time --- they can be counter-intuitive but I'm afraid reading up about the subject is the only fix. We can recommend some "light" reading on the subject, if you like... FILENAME GENERATION If a word contains an unquoted instance of one of the characters `= *', `(', `|', `<', `[', or `?', it is regarded as a pattern for filen= ame generation, unless the GLOB option is unset. If the EXTENDED_G= LOB option is set, the `^' and `#' characters also denote a pattern; oth= er=E2=80=90 wise they are not treated specially by the shell. The word is replaced with a list of sorted filenames that match = the pattern. If no matching pattern is found, the shell gives an er= ror message, unless the NULL_GLOB option is set, in which case the word= is deleted; or unless the NOMATCH option is unset, in which case the w= ord is left unchanged. pws