From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18767 invoked by alias); 14 Nov 2016 17:36:38 -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: 39942 Received: (qmail 23122 invoked from network); 14 Nov 2016 17:36:38 -0000 X-Qmail-Scanner-Diagnostics: from mail-ua0-f173.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.173):SA:0(-0.0/5.0):. Processed in 1.772789 secs); 14 Nov 2016 17:36:38 -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.173 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:in-reply-to:comments:references:to:subject :mime-version; bh=HN2C7mD/AlG/6RtfDGzmN/pMvDCt7hJrap5ylXjAz3E=; b=pJZvkpID1WEuuI5FT+shgJ6pUtzsbLCxskn+/WVN+PkJBlPJkOobyn4fu+O+Q4khGN sBuyaTy/tkfQ626A1PSifdXJCwKuSTbEe+sC5EYHzd7gVqeOkPfDoyKbQ3A7ZlJHrxt6 gpAeHyzV3506Ih/ocFgcC7EvzLH6rTAd7vDfmiOE0V4Ds7cVLqQFknXtfDRvYE5wNNjc 9pb9kcAv5AI8oOsWvGiokiTxM4HCP1/7PE9tBqK38Atr7dWehZraTEzWWdoStY1gmfQe wC3zsC+uPYw+y7LD1tvzVq7HtH79OPPo65GIOvRR600nitae7o+k7Cm894Xr40gKEh6n mWCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=HN2C7mD/AlG/6RtfDGzmN/pMvDCt7hJrap5ylXjAz3E=; b=h01kCk2R5dR0vv+sOZB0Gk2LqmyvNNhJWy91h51huqU3YCi1mG4eDUuESflr8JSh8R cuVl1rJJjVzEAgh3HyZac2gQVXWkVIQodVAWV67j9yRbG2JshOpOkS5eM+G93hwRJGB3 ne3rL4mKWGhlmCSO3cClwfFxiaPy6EykKknO/A9skdUCP1ldk/GCHL4F/pAuBk2/y0Kc N6yxSdrs+GJsl8YNoAQBXc3tVLcg3FKdA6G4D7OMpMCEg3rNEkIL9tlJEfjwWQch/kyq G5XnmCkTnodYqV/dp8hL7guo2mdbAF6qdNvYZCVg5vmffDP05n3KkHrrE0CsxPq+i73V /KoA== X-Gm-Message-State: ABUngvcGecqT3r0tm0kaCIGrKAVggxTdJLlvl9g08ztIjCrf3gW938g+339iwEXZzJbqxQ== X-Received: by 10.159.49.11 with SMTP id m11mr1774470uab.178.1479144580832; Mon, 14 Nov 2016 09:29:40 -0800 (PST) From: Bart Schaefer Message-Id: <161114092948.ZM23176@torch.brasslantern.com> Date: Mon, 14 Nov 2016 09:29:48 -0800 In-Reply-To: <32897.1479140706@hydra.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: Bug: Ubuntu apt-get install package-*" (Nov 14, 5:25pm) References: <161110185448.ZM25929@torch.brasslantern.com> <32897.1479140706@hydra.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Bug: Ubuntu apt-get install package-* MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 14, 5:25pm, Oliver Kiddle wrote: } } > torch% echo bl?or* } > zsh: correct 'bl?or*' to 'bl\?or\*' [nyae]? y } > bl?or* } } An interesting idea. Given that correction happens before globbing } I can't think of any particularly sane criteria for when to trigger } this correction. The less-horrible implementation would be to do this at the globbing step where CSH_NULL_GLOB is applied. I just didn't want to go to the effort of hooking up an entirely new spckword()-alike. } The "horrible implementation" seems to take anything } two characters in length or longer and ~ is not regarded as a pattern } character. So haswilds must be returning false for just '*' or '?' which } seems odd. Yes, spckword() is doing funny things to avoid giving spelling errors on ~username etc. I didn't take very much care to avoid any of that when I threw that example together. } So as it is, it would just be irritating because it would offer a } correction virtually every time you attempt to use a glob. The NO_NOMATCH option would disable this, as would NULL_GLOB. } If you defer } the correction to when a glob fails then it could be irritating if a } glob gets used in a loop Yes, there would have to be a flag at some level that would indicate whether the user had already accepted NO_NOMATCH behavior, so you'd only be asked once per top-level prompt. } And without making this the default, it probably won't help the situation } much for bash exiles expecting nonomatch behaviour. Yes, it would have to be the default when NOMATCH.