zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Bug: Ubuntu apt-get install package-*
Date: Mon, 14 Nov 2016 09:29:48 -0800	[thread overview]
Message-ID: <161114092948.ZM23176@torch.brasslantern.com> (raw)
In-Reply-To: <32897.1479140706@hydra.kiddle.eu>

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.


  reply	other threads:[~2016-11-14 17:36 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
2016-11-14 17:29     ` Bart Schaefer [this message]
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=161114092948.ZM23176@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).