From: Eric Cook <llua@gmx.com>
To: zsh-workers@zsh.org
Subject: Re: Bug: Ubuntu apt-get install package-*
Date: Thu, 10 Nov 2016 23:49:12 -0500 [thread overview]
Message-ID: <caae4108-2095-d9ce-92ce-5216504d6f1d@gmx.com> (raw)
In-Reply-To: <CAOCsvouMHChh5-Yk_FJYj0cx5wDe9rHmFsiu8EzUaSQ3X665ZQ@mail.gmail.com>
On 11/10/2016 05:43 PM, Bob wrote:
> Hello,
>
> Thank you for your great work on ZSH.
>
> I'd like to report a bug.
>
> When I run install commands with `*` for all packages I get a zsh error
> while it works in bash.
>
> For example I recently tried this: sudo apt-get install numix-wallpaper-*
>
> Regards,
> Bob
>
It isn't an bug, the * is a metacharacter used for globbing.
The difference is what the shells do when a glob fails to match a filename.
bash will pass the glob as-is to the command while zsh will stop processing the line.
You can mimic zsh's behavior in bash with: shopt -s failglob
and you can mimic bash's behavior in zsh with: unsetopt nomatch
But by default in zsh if you want to to pass arguments to a command that contain
valid metacharacters to zsh, you have to escape them by quoting.
So the correct way is:
sudo apt-get install numix-wallpaper-\*
prev parent reply other threads:[~2016-11-11 4:54 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
2016-11-11 4:49 ` Eric Cook [this message]
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=caae4108-2095-d9ce-92ce-5216504d6f1d@gmx.com \
--to=llua@gmx.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).