Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [Bug] Use of [] in python package names

On Wed, 2019-03-13 at 11:46 +0530, Varshith Sreeramdass wrote:
> I use zsh 5.7.1.
> To install spacy with GPU support, the command involved is
>     /$ pip install -U spacy[cuda100]/
> While it works perfectly on bash, zsh throws the following error.
> /        zsh: no matches found: spacy[cuda100]/
> I guess this is an issue with how [] are dealt.

Yes, the square brackets are part of file pattern matching ("globbing",
in the shell jargon) syntax, so need quoting.  Zsh just happens to be
more consistent about this than bash in the default mode (either it's a
pattern that needs to match something or it isn't and doesn't).  It's
not a bug.

If you want the bash behaviour --- where it simply ignores the pattern
if it doesn't match --- you can put

setopt nonomatch

in you ~/.zshrc.

I don't know what the oh-my-zsh attitude to this option is, but I'm
pretty sure there's no implication there of complete bash compatibility
out of the box.


Messages sorted by: Reverse Date, Date, Thread, Author