port-search: is --glob option really the default?

Joshua Root jmr at macports.org
Sun Mar 22 05:48:58 PDT 2015


> Hello list,
> 
> The man page of port-search says --glob is the default, but the result
> was different when I added this option manually, for example:
> $ port search --name guile
> found 6 ports
> 
> $ port search --name --glob guile
> found 1 ports
> 
> Did I misunderstand anything here?
> 
> Thanks.
> 
> --
> Chunyang

The man page is sort of right but also sort of wrong. If you run:

port search term

then it actually uses "*term*" as the glob. This is not the same as

port search --glob term

which uses "term" as the glob.

If you enter a search term that looks like a glob, though, it is used
as-is. These are equivalent:

port search *term
port search --glob *term

- Josh


More information about the macports-users mailing list