zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: Bug: Ubuntu apt-get install package-*
Date: Mon, 14 Nov 2016 17:25:06 +0100	[thread overview]
Message-ID: <32897.1479140706@hydra.kiddle.eu> (raw)
In-Reply-To: <161110185448.ZM25929@torch.brasslantern.com>

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


  reply	other threads:[~2016-11-14 16:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-10 22:43 Bob
2016-11-11  2:54 ` Bart Schaefer
2016-11-14 16:25   ` Oliver Kiddle [this message]
2016-11-14 17:29     ` Bart Schaefer
2016-11-11  4:49 ` Eric Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32897.1479140706@hydra.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).