From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2583 invoked by alias); 14 Nov 2016 16:30:56 -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: 39941 Received: (qmail 22887 invoked from network); 14 Nov 2016 16:30:56 -0000 X-Qmail-Scanner-Diagnostics: from nm3-vm4.bullet.mail.ir2.yahoo.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(212.82.96.93):SA:0(-0.7/5.0):. Processed in 1.938182 secs); 14 Nov 2016 16:30:56 -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.7 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: okiddle@yahoo.co.uk X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.96.93 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1479140706; bh=/bzk096a39XBwQyOUIB69e0ulkOJyV6ROe0FHGtvrJg=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=abPBd032ZMjrAIMgWd7G3JivcaWeaJpoOPLPgdp0GWc+YBCULTwRWv/7TcngZ/yzQxpfWtjFH3WqB4LoNpQIwektdvaFlPYrL7YoxkAfjSs1k4DsDqmJaTQkVjfUwpDtY0Ywtt/zC3kA1Z7a4DYMh7G0opMwp1zotiVHpzCm+LCZ4OiLYCOs4mIN9604IThnbPp+Ba9UzDRAW0mP6Se1/fSxIyJuqQS9bm2S0GvhKFqJp63v2z7CDP2TmjZU91z1k/ipO+jobqQm38ASuH+dTsDHxfVRfGV06aq+wiZLV1IxzT0Gu/suVDPJ3mKY99sZunJD0q9rRDq8q9N5MQ65kA== X-Yahoo-Newman-Id: 896019.10839.bm@smtp145.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Aom1asAVM1lDL3FsNK0hGC7WLSuickqwRdSdU33E2.7hZIq OXSwMeTL81Hn_lX2qEYTaAyI9bamj2aPsZNdGKj1yuSzopYRzZuduyaZ1mNt HIy8u3VG3jdgJd0ZiuxyD00MX9pqDssic5b9Ll71z4nXArXXyksu9mdxipke jYzHZRaEFlmwNc9__2hvkj3pR7Tz0nch4Qj2YXs8mH8uXac3v4HHRHfiOrEm VQecV9ir.VLT1kRgJYHIno9SE1LbSL5kccYQHxs69zvLm82cqZ4ForIaFwos rxsLbyEZGjLS.glqsUpXwS6Azq.3pf3lAGf9lp4e162ys1RBuuEbPnY_7MUg KWVai1liFRwLWQBZIhz.qUmOu3oxfx2dKTY3taUtPkQ.ShcolFAppF7_eoU4 fUlSj581IcYbjUlkwCyUsNoVvDLJDLrKUBDe0g0i1NGCP3psAfNepVGZhPTJ tDFH7oh3mjWULneD1ZvJF.gdR.Iv7XO.bJlC5i5.0urwbtkCeNl0tAWUn3qE LwWOzu_3h7Dt7IYiTaCtLXpEqOx1RYpQGtMrUuoU- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <161110185448.ZM25929@torch.brasslantern.com> From: Oliver Kiddle References: <161110185448.ZM25929@torch.brasslantern.com> To: zsh-workers@zsh.org Subject: Re: Bug: Ubuntu apt-get install package-* MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32896.1479140706.1@hydra.kiddle.eu> Date: Mon, 14 Nov 2016 17:25:06 +0100 Message-ID: <32897.1479140706@hydra.kiddle.eu> On 10 Nov, Bart wrote: > On Nov 10, 10:43pm, Bob wrote: > } > } When I run install commands with `*` for all packages I get a zsh error > } while it works in bash. > > Maybe it's time for something like this? > > (Truly horrible implementation follows, don't commit this, presented > for example purposes only, etc. etc.) > 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 "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. So as it is, it would just be irritating because it would offer a correction virtually every time you attempt to use a glob. If you defer the correction to when a glob fails then it could be irritating if a glob gets used in a loop and it could mean that a complex command combination might be half-way through already before you see a correction that would warrant an abort or edit response. And without making this the default, it probably won't help the situation much for bash exiles expecting nonomatch behaviour. Oliver