Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug: Ubuntu apt-get install package-*
- X-seq: zsh-workers 39913
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Bug: Ubuntu apt-get install package-*
- Date: Thu, 10 Nov 2016 18:54:48 -0800
- 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=B20RQQALnL+4zfc8B0tDvRvMC3f6LK9TKUFjYaHHVaA=; b=Oh/qtcwbdnxp9WfWB95+tqJwFmf2Xy1DUd7lCEJau+Ed3uvn17Brr3qWJHrK2K1zc1 zCk/1jNrX09CCzvQhFiZjej15Xfw24ha77kg9vr/3nIkzuyztyQkrfDrJNBzQIezYoqu fKEII6RInhG196kjy1VNhQaF5MiJ81u8THOjTRH95Rv2iRlvW71gNpVePLoJZZmdRU4+ coiyblE5pTWmIyD2+MNlLlwG0lFz8lG5w87WIH7A9/aFlmTt5xNDK0CYvleyKA3AvHuq PWLCL8MRDm4qRh7euH2OjoLVsgQznE8jRs1SIosV0qVJmSWvQ/ih4vHmwMZNCpITcS0w zV0Q==
- In-reply-to: <CAOCsvouMHChh5-Yk_FJYj0cx5wDe9rHmFsiu8EzUaSQ3X665ZQ@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAOCsvouMHChh5-Yk_FJYj0cx5wDe9rHmFsiu8EzUaSQ3X665ZQ@mail.gmail.com>
[>workers]
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: no matches found: bl?or*
torch% setopt correctall
torch% echo bl?or*
zsh: correct 'bl?or*' to 'bl\?or\*' [nyae]? y
bl?or*
diff --git a/Src/utils.c b/Src/utils.c
index 3d535b8..b9cd227 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2948,6 +2948,31 @@ spckword(char **s, int hist, int cmd, int ask)
return;
if (!(*s)[0] || !(*s)[1])
return;
+
+ if (!incond && !incmdpos && isset(NOMATCH) && haswilds(*s)) {
+ char *b, *g;
+ untokenize(g = dupstring(guess = *s));
+ b = quotestring(best = g, QT_BACKSLASH_PATTERN);
+ if (ask) {
+ if (noquery(0)) {
+ x = 'n';
+ } else if (shout) {
+ char *pptbuf;
+ pptbuf = promptexpand(sprompt, 0, b, g, NULL);
+ zputs(pptbuf, shout);
+ free(pptbuf);
+ fflush(shout);
+ zbeep();
+ x = getquery("nyae \t", 0);
+ if (cmd && x == 'n')
+ pathchecked = path;
+ } else
+ x = 'n';
+ } else
+ x = 'y';
+ goto Interpret;
+ }
+
if (cmd) {
if (shfunctab->getnode(shfunctab, *s) ||
builtintab->getnode(builtintab, *s) ||
@@ -3087,6 +3112,7 @@ spckword(char **s, int hist, int cmd, int ask)
x = 'n';
} else
x = 'y';
+ Interpret:
if (x == 'y' || x == ' ' || x == '\t') {
*s = dupstring(best);
if (hist)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author